diff options
-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()); } |