-- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
From eb23f06b7c5bda2f474549ed4e471626f8f88de0 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 | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 0 deletions(-) diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 4840916..aa81de5 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -3286,6 +3286,10 @@ void hexagon::Assemble::ConstructJob(Compilation &C, const JobAction &JA, 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 d5ae73d..4b9c4c7 100644 --- a/test/Driver/hexagon-toolchain.c +++ b/test/Driver/hexagon-toolchain.c @@ -532,3 +532,17 @@ // 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
