diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2010-11-07 23:13:01 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2010-11-07 23:13:01 +0000 |
commit | dda5b92c770b024a2b551bb22331d079821f67a0 (patch) | |
tree | 21b811e80f20af66e3132578ecaabf1fba5d978c | |
parent | 910f8008fea79120489a53593fe971b0b8a4a740 (diff) |
Use the integrated assembler when procession .s files on OpenBSD and Linux.
Original patch for OpenBSD by Vladimir Kirillov.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118386 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Driver/ToolChains.cpp | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index adbac9029e..57743e59a5 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -1044,11 +1044,20 @@ Tool &OpenBSD::SelectTool(const Compilation &C, const JobAction &JA) const { 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) { - case Action::AssembleJobClass: - T = new tools::openbsd::Assemble(*this); break; + case Action::AssembleJobClass: { + if (UseIntegratedAs) + T = new tools::ClangAs(*this); + else + T = new tools::openbsd::Assemble(*this); + break; + } case Action::LinkJobClass: T = new tools::openbsd::Link(*this); break; default: @@ -1398,11 +1407,19 @@ Tool &Linux::SelectTool(const Compilation &C, const JobAction &JA) const { 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) { case Action::AssembleJobClass: - T = new tools::linuxtools::Assemble(*this); break; + if (UseIntegratedAs) + T = new tools::ClangAs(*this); + else + T = new tools::linuxtools::Assemble(*this); + break; case Action::LinkJobClass: T = new tools::linuxtools::Link(*this); break; default: |