forked from OSchip/llvm-project
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). llvm-svn: 99660
This commit is contained in:
parent
0b57de3c4c
commit
9abbebedc8
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue