IDE: preserve the environment in the triple

Adjust the triple manipulation to preserve the environment.  This is
particularly important for android which is an environment for Linux,
and Windows, where we support specific environments only.
This commit is contained in:
Saleem Abdulrasool
2018-12-04 16:38:34 -08:00
parent fc7830a4ed
commit 7f6a333c16

View File

@@ -227,6 +227,8 @@ static std::string adjustClangTriple(StringRef TripleStr) {
break;
}
OS << '-' << Triple.getVendorName() << '-' << Triple.getOSName();
if (Triple.hasEnvironment())
OS << '-' << Triple.getEnvironmentName();
OS.flush();
return Result;
}