From: Matthew Curtis Date: Fri, 7 Dec 2012 17:23:04 +0000 (+0000) Subject: Hexagon TC: forward appropriate args to assembler X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3d8d4223813506df2f1b71cbb2f4a175faf85e6a;p=clang Hexagon TC: forward appropriate args to assembler git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169611 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 13f859da54..634e0206ee 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -3506,6 +3506,10 @@ void hexagon::Assemble::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back( Args.MakeArgString(std::string("-G") + SmallDataThreshold)); + Args.AddAllArgs(CmdArgs, options::OPT_g_Group); + Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA, + options::OPT_Xassembler); + // Only pass -x if gcc will understand it; otherwise hope gcc // understands the suffix correctly. The main use case this would go // wrong in is for linker inputs if they happened to have an odd diff --git a/test/Driver/hexagon-toolchain.c b/test/Driver/hexagon-toolchain.c index 106eabca4e..53c034d888 100644 --- a/test/Driver/hexagon-toolchain.c +++ b/test/Driver/hexagon-toolchain.c @@ -531,3 +531,18 @@ // CHECK028: "-Wreturn-type" // CHECK028-NEXT: "{{.*}}/bin/hexagon-as" // CHECK028-NEXT: "{{.*}}/bin/hexagon-ld" + +// ----------------------------------------------------------------------------- +// Test Assembler related args +// ----------------------------------------------------------------------------- +// RUN: %clang -### -target hexagon-unknown-linux \ +// RUN: -ccc-install-dir %S/Inputs/hexagon_tree/qc/bin \ +// RUN: -gdwarf-2 \ +// RUN: -Wa,--noexecstack,--trap \ +// RUN: -Xassembler --keep-locals \ +// RUN: %s 2>&1 \ +// RUN: | FileCheck -check-prefix=CHECK029 %s +// CHECK029: "{{.*}}clang{{.*}}" "-cc1" +// CHECK029-NEXT: "{{.*}}/bin/hexagon-as" +// CHECK029: "-gdwarf-2" "--noexecstack" "--trap" "--keep-locals" +// CHECK029-NEXT: "{{.*}}/bin/hexagon-ld"