From 3bc96eb2246cae9c0a7ece1cb051d28313162936 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Fri, 26 Mar 2010 22:41:03 +0000 Subject: [PATCH] Driver/Darwin: Support CCC_ENABLE_NEW_DARWIN_TOOLCHAIN as an environment override to enable use of the DarwinClang tool chain on all platforms (not just ARM). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99660 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Driver/HostInfo.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/Driver/HostInfo.cpp b/lib/Driver/HostInfo.cpp index d8e086db98..d9e2e37974 100644 --- a/lib/Driver/HostInfo.cpp +++ b/lib/Driver/HostInfo.cpp @@ -144,13 +144,15 @@ 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::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, DarwinVersion); + } 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, DarwinVersion, GCCVersion); - } else if (Arch == llvm::Triple::arm || Arch == llvm::Triple::thumb) - TC = new toolchains::DarwinClang(*this, TCTriple, DarwinVersion); - else + } else TC = new toolchains::Darwin_Generic_GCC(*this, TCTriple); }