diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2010-08-10 00:25:48 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2010-08-10 00:25:48 +0000 |
commit | ba30bbe4e36a30a274da809a11a42f9cdc168e92 (patch) | |
tree | 4335a2e94f37f168a446c7dc03439d3758838847 /lib/Driver/ToolChains.cpp | |
parent | 368b76ee98535eec93c487ae4b213fa0598a9eff (diff) |
Run the assembler instead of gcc on Linux.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110635 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChains.cpp')
-rw-r--r-- | lib/Driver/ToolChains.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index 1099b6513e..e9d6e34864 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -1034,6 +1034,26 @@ Linux::Linux(const HostInfo &Host, const llvm::Triple& Triple) // list), but that's messy at best. } +Tool &Linux::SelectTool(const Compilation &C, const JobAction &JA) const { + Action::ActionClass Key; + if (getDriver().ShouldUseClangCompiler(C, JA, getTriple())) + Key = Action::AnalyzeJobClass; + else + Key = JA.getKind(); + + Tool *&T = Tools[Key]; + if (!T) { + switch (Key) { + case Action::AssembleJobClass: + T = new tools::linuxtools::Assemble(*this); break; + default: + T = &Generic_GCC::SelectTool(C, JA); + } + } + + return *T; +} + /// DragonFly - DragonFly tool chain which can call as(1) and ld(1) directly. DragonFly::DragonFly(const HostInfo &Host, const llvm::Triple& Triple) |