summaryrefslogtreecommitdiff
path: root/lib/Driver/HostInfo.cpp
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2010-04-02 08:55:10 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2010-04-02 08:55:10 +0000
commit11d2b2d2bb706fca0656f2760839721bb7f6cb6f (patch)
treed374cdca417e76f1bf101f139dba2db1d10ee8f7 /lib/Driver/HostInfo.cpp
parentc0c7bca4e5b8d12699dc93a0da49e9e4bb79671b (diff)
Notes
Diffstat (limited to 'lib/Driver/HostInfo.cpp')
-rw-r--r--lib/Driver/HostInfo.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Driver/HostInfo.cpp b/lib/Driver/HostInfo.cpp
index d8e086db98d1..d9e2e379745f 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);
}