diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-04-01 20:33:11 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-04-01 20:33:11 +0000 |
commit | bf54a06f9b771c2a2730cc63eb89bce0522515b5 (patch) | |
tree | dcd8ae096ff43434ac743e95bf25e25409745c24 /lib/Driver/Driver.cpp | |
parent | 2add47387d39ee6c40dcb0e9f3d51c27ad1e113c (diff) |
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
Diffstat (limited to 'lib/Driver/Driver.cpp')
-rw-r--r-- | lib/Driver/Driver.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp index 84e4cea3d0..b59768d1d0 100644 --- a/lib/Driver/Driver.cpp +++ b/lib/Driver/Driver.cpp @@ -1065,8 +1065,10 @@ const HostInfo *Driver::GetHostInfo(const char *Triple) const { Arch = "i386"; else if (Arch == "amd64") Arch = "x86_64"; - else if (Arch == "powerpc" || Arch == "Power Macintosh") - Arch = "ppc"; + else if (Arch == "ppc" || Arch == "Power Macintosh") + Arch = "powerpc"; + else if (Arch == "ppc64") + Arch = "powerpc64"; if (memcmp(&OS[0], "darwin", 6) == 0) return createDarwinHostInfo(*this, Arch.c_str(), Platform.c_str(), @@ -1080,7 +1082,14 @@ const HostInfo *Driver::GetHostInfo(const char *Triple) const { } bool Driver::ShouldUseClangCompiler(const Compilation &C, const JobAction &JA, - const std::string &ArchName) const { + const std::string &ArchNameStr) const { + // FIXME: Remove this hack. + const char *ArchName = ArchNameStr.c_str(); + if (ArchNameStr == "powerpc") + ArchName = "ppc"; + else if (ArchNameStr == "powerpc64") + ArchName = "ppc64"; + // Check if user requested no clang, or clang doesn't understand // this type (we only handle single inputs for now). if (!CCCUseClang || JA.size() != 1 || |