]> granicus.if.org Git - clang/commitdiff
-arch ppc should change the triple to powerpc-foo not to ppc-foo.
authorChris Lattner <sabre@nondot.org>
Tue, 24 Mar 2009 16:18:41 +0000 (16:18 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 24 Mar 2009 16:18:41 +0000 (16:18 +0000)
Similarly for ppc64.  This should probably move into the driver, along
with all the other target selection stuff other than -triple.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67621 91177308-0d34-0410-b5e6-96231b3b80d8

tools/clang-cc/clang.cpp

index 2ae1b6ec7377d2019b6b314c396e865ea16b6f22..e0a90a3600bb23a49d8d749191c29656d43d905d 100644 (file)
@@ -807,6 +807,12 @@ static std::string CreateTargetTriple() {
               Triple.c_str());
       exit(1);
     }
+    
+    // Canonicalize -arch ppc to add "powerpc" to the triple, not ppc.
+    if (Arch == "ppc")
+      Arch = "powerpc";
+    else if (Arch == "ppc64")
+      Arch = "powerpc64";
   
     Triple = Arch + std::string(Triple.begin()+FirstDashIdx, Triple.end());
   }