diff options
author | Chris Lattner <sabre@nondot.org> | 2009-03-24 16:18:41 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-03-24 16:18:41 +0000 |
commit | 37e217cf4d4ca7923833552c62f023001e74632f (patch) | |
tree | 42f22128976774712c3840e2577b4820bde89d94 | |
parent | c6498f9625d6f039a3134940e832758d8fb62966 (diff) |
-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
-rw-r--r-- | tools/clang-cc/clang.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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()); } |