[cfe-commits] [PATCH] [6/6] Hexagon TC: forward appropriate args to assembler
Matthew Curtis
mcurtis at codeaurora.org
Mon Sep 24 07:47:37 PDT 2012
Update to patch cleanly against previous patches.
Matthew C.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
-------------- next part --------------
>From 4289c2cae373717bb6ef16548c5e461659f693b1 Mon Sep 17 00:00:00 2001
From: Matthew Curtis <mcurtis at codeaurora.org>
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 2e9f75d..dc3631f 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -3306,6 +3306,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
More information about the cfe-commits
mailing list