]> granicus.if.org Git - clang/commitdiff
Driver/Darwin: Switch back to old toolchain, looks like new one isn't quite
authorDaniel Dunbar <daniel@zuster.org>
Thu, 26 Aug 2010 01:41:44 +0000 (01:41 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Thu, 26 Aug 2010 01:41:44 +0000 (01:41 +0000)
ready yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112138 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/HostInfo.cpp

index b8d26ff8138318bddc16b73e67220b4fb0165f24..7c5e430bb7d58026b97dd75252f39b4ba056236b 100644 (file)
@@ -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);
   }