[PATCH] [IAS] Teach -cc1as about the 'target-abi' option.
Toma Tabacu
toma.tabacu at imgtec.com
Fri Feb 27 05:41:15 PST 2015
Made a new test which uses cc1as directly, as suggested by Simon.
http://reviews.llvm.org/D7903
Files:
include/clang/Driver/CC1Options.td
test/Driver/target-abi-cc1as.s
Index: include/clang/Driver/CC1Options.td
===================================================================
--- include/clang/Driver/CC1Options.td
+++ include/clang/Driver/CC1Options.td
@@ -25,11 +25,11 @@
HelpText<"Target specific attributes">;
def triple : Separate<["-"], "triple">,
HelpText<"Specify target triple (e.g. i686-apple-darwin9)">;
+def target_abi : Separate<["-"], "target-abi">,
+ HelpText<"Target a particular ABI type">;
}
-def target_abi : Separate<["-"], "target-abi">,
- HelpText<"Target a particular ABI type">;
def target_linker_version : Separate<["-"], "target-linker-version">,
HelpText<"Target linker version">;
def triple_EQ : Joined<["-"], "triple=">, Alias<triple>;
Index: test/Driver/target-abi-cc1as.s
===================================================================
--- /dev/null
+++ test/Driver/target-abi-cc1as.s
@@ -0,0 +1,17 @@
+// Check if -cc1as knows about the 'target-abi' argument.
+
+// RUN: %clang -cc1as -triple mips--linux-gnu -filetype obj -target-cpu mips32 -target-abi o32 %s 2>&1 | \
+// RUN: FileCheck --check-prefix=ABI-O32 %s
+// ABI-O32-NOT: clang -cc1as: error: unknown argument: '-target-abi'
+
+// RUN: %clang -cc1as -triple mips--linux-gnu -filetype obj -target-cpu mips32 -target-abi eabi %s 2>&1 | \
+// RUN: FileCheck --check-prefix=ABI-EABI32 %s
+// ABI-EABI32-NOT: clang -cc1as: error: unknown argument: '-target-abi'
+
+// RUN: %clang -cc1as -triple mips64--linux-gnu -filetype obj -target-cpu mips64 -target-abi n32 %s 2>&1 | \
+// RUN: FileCheck --check-prefix=ABI-N32 %s
+// ABI-N32-NOT: clang -cc1as: error: unknown argument: '-target-abi'
+
+// RUN: %clang -cc1as -triple mips64--linux-gnu -filetype obj -target-cpu mips64 -target-abi n64 %s 2>&1 | \
+// RUN: FileCheck --check-prefix=ABI-N64 %s
+// ABI-N64-NOT: clang -cc1as: error: unknown argument: '-target-abi'
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7903.20847.patch
Type: text/x-patch
Size: 1868 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150227/9850e789/attachment.bin>
More information about the cfe-commits
mailing list