aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-08-26 01:41:44 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-08-26 01:41:44 +0000
commit2dc70ad391cb75ea90a2fb5d14a7f1d271534da3 (patch)
tree3edba41f23f0565a3cd283f08aaee663ad402247
parentc460889b865c6beb4cbfec1afecf5d8f14b3b108 (diff)
Driver/Darwin: Switch back to old toolchain, looks like new one isn't quite
ready yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112138 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Driver/HostInfo.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Driver/HostInfo.cpp b/lib/Driver/HostInfo.cpp
index b8d26ff813..7c5e430bb7 100644
--- a/lib/Driver/HostInfo.cpp
+++ b/lib/Driver/HostInfo.cpp
@@ -113,9 +113,13 @@ ToolChain *DarwinHostInfo::CreateToolChain(const ArgList &Args,
TCTriple.setArch(Arch);
// If we recognized the arch, match it to the toolchains we support.
- if (Arch == llvm::Triple::arm || Arch == llvm::Triple::thumb ||
- Arch == llvm::Triple::x86 || Arch == llvm::Triple::x86_64) {
+ const char *UseNewToolChain = ::getenv("CCC_ENABLE_NEW_DARWIN_TOOLCHAIN");
+ if (UseNewToolChain ||
+ Arch == llvm::Triple::arm || Arch == llvm::Triple::thumb) {
TC = new toolchains::DarwinClang(*this, TCTriple);
+ } else if (Arch == llvm::Triple::x86 || Arch == llvm::Triple::x86_64) {
+ // We still use the legacy DarwinGCC toolchain on X86.
+ TC = new toolchains::DarwinGCC(*this, TCTriple);
} else
TC = new toolchains::Darwin_Generic_GCC(*this, TCTriple);
}