From: Toma Tabacu Date: Wed, 4 Mar 2015 14:24:25 +0000 (+0000) Subject: [IAS] Teach -cc1as about the 'target-abi' option. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0448626ef587c4a3e2d9e595d8f3cdc1d5515b1a;p=clang [IAS] Teach -cc1as about the 'target-abi' option. Summary: When using the IAS from clang, the 'target-abi' option gets passed to cc1as, but cc1as doesn't know about it and gives an "unknown argument" error. This is fixed by adding the 'CC1AsOption' flag to the 'target-abi' option in CC1Options.td. Reviewers: atanasyan, echristo, dsanders Reviewed By: dsanders Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D7903 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231244 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Driver/CC1Options.td b/include/clang/Driver/CC1Options.td index f60fb4e4ab..19b56f72ba 100644 --- a/include/clang/Driver/CC1Options.td +++ b/include/clang/Driver/CC1Options.td @@ -25,11 +25,11 @@ def target_feature : Separate<["-"], "target-feature">, 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; diff --git a/test/Driver/target-abi-cc1as.s b/test/Driver/target-abi-cc1as.s new file mode 100644 index 0000000000..86c9fc361b --- /dev/null +++ b/test/Driver/target-abi-cc1as.s @@ -0,0 +1,5 @@ +// 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'