diff options
author | Eric Christopher <echristo@gmail.com> | 2016-01-06 07:24:45 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2016-01-06 07:24:45 +0000 |
commit | 29a50bccb98818d0beac75771242a24b0e7da0c3 (patch) | |
tree | d6f2d6bafb52584a175c77df6a2814b32f959f9a /clang/lib/Driver | |
parent | 1b94d9a3cc337d597147ac8ebaa106d8c11ef029 (diff) | |
download | bcm5719-llvm-29a50bccb98818d0beac75771242a24b0e7da0c3.tar.gz bcm5719-llvm-29a50bccb98818d0beac75771242a24b0e7da0c3.zip |
Change the set of actions built for external gcc tools.
A gcc tool has an "integrated" assembler (usually gas) that it
will call to produce an object. Let it use that assembler so
that we don't have to deal with assembly syntax incompatibilities.
llvm-svn: 256919
Diffstat (limited to 'clang/lib/Driver')
-rw-r--r-- | clang/lib/Driver/Tools.cpp | 5 | ||||
-rw-r--r-- | clang/lib/Driver/Tools.h | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 7af1899b383..c6144522576 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -6179,6 +6179,11 @@ void gcc::Compiler::RenderExtraToolArgs(const JobAction &JA, case types::TY_LTO_BC: CmdArgs.push_back("-c"); break; + // We assume we've got an "integrated" assembler in that gcc will produce an + // object file itself. + case types::TY_Object: + CmdArgs.push_back("-c"); + break; case types::TY_PP_Asm: CmdArgs.push_back("-S"); break; diff --git a/clang/lib/Driver/Tools.h b/clang/lib/Driver/Tools.h index 314315dea00..168662f7e7f 100644 --- a/clang/lib/Driver/Tools.h +++ b/clang/lib/Driver/Tools.h @@ -149,6 +149,10 @@ public: Common(const char *Name, const char *ShortName, const ToolChain &TC) : GnuTool(Name, ShortName, TC) {} + // A gcc tool has an "integrated" assembler that it will call to produce an + // object. Let it use that assembler so that we don't have to deal with + // assembly syntax incompatibilities. + bool hasIntegratedAssembler() const override { return true; } void ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const llvm::opt::ArgList &TCArgs, |