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; Index: test/Driver/mips-integrated-as.s =================================================================== --- test/Driver/mips-integrated-as.s +++ test/Driver/mips-integrated-as.s @@ -1,40 +1,44 @@ -// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \ +// RUN: %clang -target mips-linux-gnu -v -fintegrated-as -c %s 2>&1 | \ // RUN: FileCheck -check-prefix=ABI-O32 %s -// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mabi=32 2>&1 | \ +// RUN: %clang -target mips-linux-gnu -v -fintegrated-as -c %s -mabi=32 2>&1 | \ // RUN: FileCheck -check-prefix=ABI-O32 %s -// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mabi=o32 2>&1 | \ +// RUN: %clang -target mips-linux-gnu -v -fintegrated-as -c %s -mabi=o32 2>&1 | \ // RUN: FileCheck -check-prefix=ABI-O32 %s // ABI-O32: -cc1as -// ABI-O32: "-target-abi" "o32" +// ABI-O32: -target-abi o32 +// ABI-O32-NOT: clang -cc1as: error: unknown argument: '-target-abi' -// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mabi=eabi 2>&1 | \ +// RUN: %clang -target mips-linux-gnu -v -fintegrated-as -c %s -mabi=eabi 2>&1 | \ // RUN: FileCheck -check-prefix=ABI-EABI32 %s // ABI-EABI32: -cc1as -// ABI-EABI32: "-target-abi" "eabi" +// ABI-EABI32: -target-abi eabi +// ABI-EABI32-NOT: clang -cc1as: error: unknown argument: '-target-abi' -// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mips64 -mabi=n32 2>&1 | \ +// RUN: %clang -target mips-linux-gnu -v -fintegrated-as -c %s -mips64 -mabi=n32 2>&1 | \ // RUN: FileCheck -check-prefix=ABI-N32 %s -// RUN: %clang -target mips64-linux-gnu -### -fintegrated-as -c %s -mabi=n32 2>&1 | \ +// RUN: %clang -target mips64-linux-gnu -v -fintegrated-as -c %s -mabi=n32 2>&1 | \ // RUN: FileCheck -check-prefix=ABI-N32 %s // ABI-N32: -cc1as -// ABI-N32: "-target-abi" "n32" +// ABI-N32: -target-abi n32 +// ABI-N32-NOT: clang -cc1as: error: unknown argument: '-target-abi' // FIXME: We should also test '-target mips-linux-gnu -mips64' defaults to the // default 64-bit ABI (N64 but GCC uses N32). It currently selects O32 // because of the triple. -// RUN: %clang -target mips64-linux-gnu -### -fintegrated-as -c %s -mips64 2>&1 | \ +// RUN: %clang -target mips64-linux-gnu -v -fintegrated-as -c %s -mips64 2>&1 | \ // RUN: FileCheck -check-prefix=ABI-N64 %s // -// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mips64 -mabi=64 2>&1 | \ +// RUN: %clang -target mips-linux-gnu -v -fintegrated-as -c %s -mips64 -mabi=64 2>&1 | \ // RUN: FileCheck -check-prefix=ABI-N64 %s -// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mips64 -mabi=n64 2>&1 | \ +// RUN: %clang -target mips-linux-gnu -v -fintegrated-as -c %s -mips64 -mabi=n64 2>&1 | \ // RUN: FileCheck -check-prefix=ABI-N64 %s -// RUN: %clang -target mips64-linux-gnu -### -fintegrated-as -c %s -mips64 -mabi=64 2>&1 | \ +// RUN: %clang -target mips64-linux-gnu -v -fintegrated-as -c %s -mips64 -mabi=64 2>&1 | \ // RUN: FileCheck -check-prefix=ABI-N64 %s -// RUN: %clang -target mips64-linux-gnu -### -fintegrated-as -c %s -mips64 -mabi=n64 2>&1 | \ +// RUN: %clang -target mips64-linux-gnu -v -fintegrated-as -c %s -mips64 -mabi=n64 2>&1 | \ // RUN: FileCheck -check-prefix=ABI-N64 %s // ABI-N64: -cc1as -// ABI-N64: "-target-abi" "n64" +// ABI-N64: -target-abi n64 +// ABI-N64-NOT: clang -cc1as: error: unknown argument: '-target-abi' // RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -msoft-float 2>&1 | \ // RUN: FileCheck -check-prefix=SOFTFLOAT %s