(LLVM up) Update to use llvm::sys::getHostTriple().
- Always pass -triple to clang-cc (-arch will be removed).
- clang-cc doesn't play guess work with the target triple anymore.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68119 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index e315a2f..cae0766 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -39,6 +39,11 @@
const char *LinkingOutput) const {
ArgStringList CmdArgs;
+ CmdArgs.push_back("-triple");
+ const char *TripleStr =
+ Args.MakeArgString(getToolChain().getTripleString().c_str());
+ CmdArgs.push_back(TripleStr);
+
if (isa<AnalyzeJobAction>(JA)) {
assert(JA.getType() == types::TY_Plist && "Invalid output type.");
CmdArgs.push_back("-analyze");
@@ -371,11 +376,6 @@
Args.AddAllArgValues(CmdArgs, options::OPT_Xclang);
- // FIXME: Always pass the full triple once we aren't concerned with
- // ccc compat.
- CmdArgs.push_back("-arch");
- CmdArgs.push_back(getToolChain().getArchName().c_str());
-
if (Output.getType() == types::TY_Dependencies) {
// Handled with other dependency code.
} else if (Output.isPipe()) {