Quick and dirty (!) fix to make sure we use powerpc in triples.
- PR3922
- I have a clean solution for this in flight, but it may take a while
to come to fruition so we'll take a quick fix for now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68241 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index e4fff9c..b8c07cc 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -453,7 +453,14 @@
// If using a driver driver, force the arch.
if (getToolChain().getHost().useDriverDriver()) {
CmdArgs.push_back("-arch");
- CmdArgs.push_back(getToolChain().getArchName().c_str());
+
+ // FIXME: Remove these special cases.
+ const char *Str = getToolChain().getArchName().c_str();
+ if (strcmp(Str, "powerpc") == 0)
+ Str = "ppc";
+ else if (strcmp(Str, "powerpc64") == 0)
+ Str = "ppc64";
+ CmdArgs.push_back(Str);
}
if (Output.isPipe()) {