From: Chris Lattner Date: Tue, 24 Mar 2009 16:18:41 +0000 (+0000) Subject: -arch ppc should change the triple to powerpc-foo not to ppc-foo. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=37e217cf4d4ca7923833552c62f023001e74632f;p=clang -arch ppc should change the triple to powerpc-foo not to ppc-foo. 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 --- diff --git a/tools/clang-cc/clang.cpp b/tools/clang-cc/clang.cpp index 2ae1b6ec73..e0a90a3600 100644 --- a/tools/clang-cc/clang.cpp +++ b/tools/clang-cc/clang.cpp @@ -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()); }