diff options
author | Chad Rosier <mcrosier@apple.com> | 2011-07-20 19:14:30 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2011-07-20 19:14:30 +0000 |
commit | c57114ab9f8e4c2d680f43a95fe23b13f446b723 (patch) | |
tree | 3949b4348dc51efff237aaeffaa46a405f1eca11 /lib | |
parent | 909bcb37c4bc1ea1a62d505881defc3c3ba0eca3 (diff) |
If -ccc-host-triple i386-pc-win32-macho or -ccc-host-triple
x86_64-pc-win32-macho is used in conjunction with -no-integrated-as go ahead and
use the Darwin system assembler.
rdar://9785470
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135604 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Driver/ToolChains.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index 1619ef8f84..8b5b2ec9b0 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -1752,6 +1752,10 @@ Tool &Windows::SelectTool(const Compilation &C, const JobAction &JA, else Key = JA.getKind(); + bool UseIntegratedAs = C.getArgs().hasFlag(options::OPT_integrated_as, + options::OPT_no_integrated_as, + IsIntegratedAssemblerDefault()); + Tool *&T = Tools[Key]; if (!T) { switch (Key) { @@ -1766,7 +1770,11 @@ Tool &Windows::SelectTool(const Compilation &C, const JobAction &JA, case Action::CompileJobClass: T = new tools::Clang(*this); break; case Action::AssembleJobClass: - T = new tools::ClangAs(*this); break; + if (!UseIntegratedAs && getTriple().getEnvironment() == llvm::Triple::MachO) + T = new tools::darwin::Assemble(*this); + else + T = new tools::ClangAs(*this); + break; case Action::LinkJobClass: T = new tools::visualstudio::Link(*this); break; } |