Refreshing patch against current trunk. Matthew Curtis.
-- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
>From 8af790c2c29b833d660d871376e77f2cce9b1dcf Mon Sep 17 00:00:00 2001 From: Matthew Curtis <[email protected]> Date: Fri, 14 Sep 2012 12:58:08 -0500 Subject: [PATCH 6/6] Hexagon TC: forward appropriate args to assembler --- lib/Driver/Tools.cpp | 4 ++++ test/Driver/hexagon-toolchain.c | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 0 deletions(-) diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index ee5334f..1828f1f 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -3475,6 +3475,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 c903dbd..2d99c07 100644 --- a/test/Driver/hexagon-toolchain.c +++ b/test/Driver/hexagon-toolchain.c @@ -531,3 +531,18 @@ // CHECK028: "-Wreturn-type" // CHECK028-NEXT: "[[GNU_DIR:.*]]/bin/hexagon-as" // CHECK028-NEXT: "[[GNU_DIR]]/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: "[[GNU_DIR:.*]]/bin/hexagon-as" +// CHECK029: "-gdwarf-2" "--noexecstack" "--trap" "--keep-locals" +// CHECK029-NEXT: "[[GNU_DIR]]/bin/hexagon-ld" -- 1.7.8.3
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
