From: Roman Divacky Date: Mon, 8 Nov 2010 17:46:39 +0000 (+0000) Subject: Use integrated-as for processing .s files on FreeBSD. Copied X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=67dece7e8b38138dd07e3d461d675dd8c8b4e025;p=clang Use integrated-as for processing .s files on FreeBSD. Copied from Linux/OpenBSD code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118419 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index 6a15666362..07ab226ad6 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -1098,11 +1098,18 @@ Tool &FreeBSD::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::freebsd::Assemble(*this); break; + if (UseIntegratedAs) + T = new tools::ClangAs(*this); + else + T = new tools::freebsd::Assemble(*this); case Action::LinkJobClass: T = new tools::freebsd::Link(*this); break; default: