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: http://review.tizen.org/git/?a=commitdiff_plain;h=71f5be1ed0f8a70827b27a867945a67dc7417666;p=platform%2Fupstream%2Fllvm.git [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 llvm-svn: 231244 --- diff --git a/clang/include/clang/Driver/CC1Options.td b/clang/include/clang/Driver/CC1Options.td index f60fb4e..19b56f7 100644 --- a/clang/include/clang/Driver/CC1Options.td +++ b/clang/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/clang/test/Driver/target-abi-cc1as.s b/clang/test/Driver/target-abi-cc1as.s new file mode 100644 index 0000000..86c9fc3 --- /dev/null +++ b/clang/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'