Skip to content

Commit f39c399

Browse files
committed
[Driver] -###: exit with code 1 if hasErrorOccurred
The exit code for -### is inconsistent. Unrecognized options lead to exit code 1, as expected. However, most others errors (including invalid option value) lead to exit code 0, differing from GCC and most utilities. This is a longstanding quirk of -###, and we didn't fix it because many driver tests need adjustment. Change -### to be similar to -fdriver-only -v and exit with code 1. This requires fixing many driver tests, but the end result gives us stronger tests. * Existing `RUN: %clang -### ...` tests usually don't use `CHECK-NOT: error:` or `--implicit-check-not=error:`. If a change introduces an error, such a change usually cannot be detected. * Many folks contributing new tests don't know `-fdriver-only -v`. To test no driver error/warning for new tests, they can use the familiar `-### -Werror` instead of `-fdriver-only -v -Werror`. An incomplete list of prerequisite test improvement: * 2f79bb1: add -nogpulib to some AMDGPU tests * 9155e51: add --cuda-path= (test w/ and w/o /usr/local/cuda) * 80765ed: -mcpu=native may return either 0 or 1, depending on whether `--target=` specifies a native target * abae53f: fix -fuse-ld=lld misuses (test w/o and w/o /usr/local/bin/ld.lld) * ab68df5: add -resource-dir= and -fvisibility=hidden to some -fsanitize=cfi tests * d5ca160: --rtlib=platform without --unwindlib= may fail if CLANG_DEFAULT_UNWINDLIB=unwindlib Reviewed By: jhuber6, yaxunl, dblaikie Differential Revision: https://reviews.llvm.org/D156363
1 parent 63c648f commit f39c399

File tree

225 files changed

+981
-981
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

225 files changed

+981
-981
lines changed

clang/lib/Driver/Driver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1889,7 +1889,7 @@ int Driver::ExecuteCompilation(
18891889
// Just print if -### was present.
18901890
if (C.getArgs().hasArg(options::OPT__HASH_HASH_HASH)) {
18911891
C.getJobs().Print(llvm::errs(), "\n", true);
1892-
return 0;
1892+
return Diags.hasErrorOccurred() ? 1 : 0;
18931893
}
18941894

18951895
// If there were errors building the compilation, quit now.

clang/test/Driver/XRay/xray-instrument.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %clang -### --target=aarch64-pc-freebsd -fxray-instrument -c %s -o /dev/null 2>&1 | FileCheck %s
22
// RUN: %clang -### --target=arm64-apple-macos -fxray-instrument -c %s -o /dev/null 2>&1 | FileCheck %s
33
// RUN: %clang -### --target=x86_64-apple-darwin -fxray-instrument -c %s -o /dev/null 2>&1 | FileCheck %s
4-
// RUN: %clang -### --target=x86_64-pc-windows -fxray-instrument -c %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR
4+
// RUN: not %clang -### --target=x86_64-pc-windows -fxray-instrument -c %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR
55

66
// CHECK: "-cc1" {{.*}}"-fxray-instrument"
77
// ERR: error: unsupported option '-fxray-instrument' for target

clang/test/Driver/aarch64-ite.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// RUN: %clang -### --target=aarch64-none-elf -march=armv9.3-a+noite %s 2>&1 | FileCheck %s --check-prefix=DISABLED
1010

1111
// FEAT_ITE is invalid before v8
12-
// RUN: %clang -### --target=arm-none-none-eabi -march=armv7-a+ite %s 2>&1 | FileCheck %s --check-prefix=INVALID
12+
// RUN: not %clang -### --target=arm-none-none-eabi -march=armv7-a+ite %s 2>&1 | FileCheck %s --check-prefix=INVALID
1313

1414
// INVALID: error: unsupported argument 'armv7-a+ite' to option '-march='
1515
// ENABLED: "-target-feature" "+ite"

clang/test/Driver/aarch64-lrcpc3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
// RUN: %clang -### --target=aarch64-none-elf -march=armv9-a+norcpc3 %s 2>&1 | FileCheck %s --check-prefix=DISABLED
1818

1919
// FEAT_RCPC3 is invalid before v8
20-
// RUN: %clang -### --target=arm-none-none-eabi -march=armv7-a+rcpc3 %s 2>&1 | FileCheck %s --check-prefix=INVALID
20+
// RUN: not %clang -### --target=arm-none-none-eabi -march=armv7-a+rcpc3 %s 2>&1 | FileCheck %s --check-prefix=INVALID
2121

2222
// INVALID: error: unsupported argument 'armv7-a+rcpc3' to option '-march='
2323
// ENABLED: "-target-feature" "+rcpc3"

clang/test/Driver/aarch64-security-options.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
// RUN: %clang --target=aarch64 -c %s -### -mbranch-protection=pac-ret -msign-return-address=none 2>&1 | \
2222
// RUN: FileCheck %s --check-prefix=CONFLICT --check-prefix=WARN
2323

24-
// RUN: %clang --target=aarch64 -c %s -### -msign-return-address=foo 2>&1 | \
24+
// RUN: not %clang --target=aarch64 -c %s -### -msign-return-address=foo 2>&1 | \
2525
// RUN: FileCheck %s --check-prefix=BAD-RA-PROTECTION --check-prefix=WARN
2626

27-
// RUN: %clang --target=aarch64 -c %s -### -mbranch-protection=bar 2>&1 | \
27+
// RUN: not %clang --target=aarch64 -c %s -### -mbranch-protection=bar 2>&1 | \
2828
// RUN: FileCheck %s --check-prefix=BAD-BP-PROTECTION --check-prefix=WARN
2929

3030
// RUN: %clang --target=aarch64 -### -o /dev/null -mbranch-protection=standard /dev/null 2>&1 | \

clang/test/Driver/aarch64-sve-vector-bits.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@
4646

4747
// Error out if an unsupported value is passed to -msve-vector-bits.
4848
// -----------------------------------------------------------------------------
49-
// RUN: %clang -c %s -### --target=aarch64-none-linux-gnu -march=armv8-a+sve \
49+
// RUN: not %clang -c %s -### --target=aarch64-none-linux-gnu -march=armv8-a+sve \
5050
// RUN: -msve-vector-bits=64 2>&1 | FileCheck --check-prefix=CHECK-BAD-VALUE-ERROR %s
51-
// RUN: %clang -c %s -### --target=aarch64-none-linux-gnu -march=armv8-a+sve \
51+
// RUN: not %clang -c %s -### --target=aarch64-none-linux-gnu -march=armv8-a+sve \
5252
// RUN: -msve-vector-bits=A 2>&1 | FileCheck --check-prefix=CHECK-BAD-VALUE-ERROR %s
5353

5454
// CHECK-BAD-VALUE-ERROR: error: unsupported argument '{{.*}}' to option '-msve-vector-bits='

clang/test/Driver/aarch64-target-as-march.s

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
// MULTIPLE-VALUES-NOT: "-target-feature" "+v8.2a
3636

3737
/// march to compiler and assembler, we choose the one suited to the input file type
38-
// RUN: %clang --target=aarch64-linux-gnueabi -### -c -Wa,-march=armv8.3-a -march=armv8.4-a %s 2>&1 | \
38+
// RUN: not %clang --target=aarch64-linux-gnueabi -### -c -Wa,-march=armv8.3-a -march=armv8.4-a %s 2>&1 | \
3939
// RUN: FileCheck --check-prefix=TARGET-FEATURE-3 %s
4040
// RUN: %clang --target=aarch64-linux-gnueabi -### -c -Wa,-march=armv8.3-a -march=armv8.4-a \
4141
// RUN: %S/Inputs/wildcard1.c 2>&1 | FileCheck --check-prefix=TARGET-FEATURE-4 %s
@@ -46,9 +46,9 @@
4646
// TARGET-FEATURE-4-NOT: "-target-feature" "+v8.3a"
4747

4848
// Invalid -march settings
49-
// RUN: %clang --target=aarch64-linux-gnueabi -### -c -Wa,-march=all %s 2>&1 | \
49+
// RUN: not %clang --target=aarch64-linux-gnueabi -### -c -Wa,-march=all %s 2>&1 | \
5050
// RUN: FileCheck --check-prefix=INVALID-ARCH-1 %s
51-
// RUN: %clang --target=aarch64-linux-gnueabi -### -c -Wa,-march=foobar %s 2>&1 | \
51+
// RUN: not %clang --target=aarch64-linux-gnueabi -### -c -Wa,-march=foobar %s 2>&1 | \
5252
// RUN: FileCheck --check-prefix=INVALID-ARCH-2 %s
5353

5454
// INVALID-ARCH-1: error: unsupported argument 'all' to option '-march='

clang/test/Driver/aarch64-the.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
// RUN: %clang -### --target=aarch64-none-elf -march=armv9.3-a+nothe %s 2>&1 | FileCheck %s --check-prefix=DISABLED
1818

1919
// FEAT_THE is invalid before v8
20-
// RUN: %clang -### --target=arm-none-none-eabi -march=armv7-a+the %s 2>&1 | FileCheck %s --check-prefix=INVALID
20+
// RUN: not %clang -### --target=arm-none-none-eabi -march=armv7-a+the %s 2>&1 | FileCheck %s --check-prefix=INVALID
2121

2222
// INVALID: error: unsupported argument 'armv7-a+the' to option '-march='
2323
// ENABLED: "-target-feature" "+the"

clang/test/Driver/aix-err-options.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
// RUN: %clang --target=powerpc-ibm-aix-xcoff -### -E -G 0 2>&1 %s | \
1+
// RUN: not %clang --target=powerpc-ibm-aix-xcoff -### -E -G 0 2>&1 %s | \
22
// RUN: FileCheck --check-prefix=CHECK32 %s
3-
// RUN: %clang --target=powerpc-ibm-aix-xcoff -### -S -emit-llvm -G 0 2>&1 %s | \
3+
// RUN: not %clang --target=powerpc-ibm-aix-xcoff -### -S -emit-llvm -G 0 2>&1 %s | \
44
// RUN: FileCheck --check-prefix=CHECK32 %s
5-
// RUN: %clang --target=powerpc-ibm-aix-xcoff -### -c -G 0 2>&1 %s | \
5+
// RUN: not %clang --target=powerpc-ibm-aix-xcoff -### -c -G 0 2>&1 %s | \
66
// RUN: FileCheck --check-prefix=CHECK32 %s
77
// RUN: touch %t.s %t.o
8-
// RUN: %clang --target=powerpc-ibm-aix-xcoff -### -c %t.s -G 0 2>&1 | FileCheck --check-prefix=CHECK32 %s
9-
// RUN: %clang --target=powerpc-ibm-aix-xcoff -### -o dummy.so %t.o -G 0 2>&1 | FileCheck --check-prefix=CHECK32 %s
8+
// RUN: not %clang --target=powerpc-ibm-aix-xcoff -### -c %t.s -G 0 2>&1 | FileCheck --check-prefix=CHECK32 %s
9+
// RUN: not %clang --target=powerpc-ibm-aix-xcoff -### -o dummy.so %t.o -G 0 2>&1 | FileCheck --check-prefix=CHECK32 %s
1010

11-
// RUN: %clang --target=powerpc64-ibm-aix-xcoff -### -E -G 0 2>&1 %s | \
11+
// RUN: not %clang --target=powerpc64-ibm-aix-xcoff -### -E -G 0 2>&1 %s | \
1212
// RUN: FileCheck --check-prefix=CHECK64 %s
13-
// RUN: %clang --target=powerpc64-ibm-aix-xcoff -### -S -emit-llvm -G 0 2>&1 %s | \
13+
// RUN: not %clang --target=powerpc64-ibm-aix-xcoff -### -S -emit-llvm -G 0 2>&1 %s | \
1414
// RUN: FileCheck --check-prefix=CHECK64 %s
15-
// RUN: %clang --target=powerpc64-ibm-aix-xcoff -### -c -G 0 2>&1 %s | \
15+
// RUN: not %clang --target=powerpc64-ibm-aix-xcoff -### -c -G 0 2>&1 %s | \
1616
// RUN: FileCheck --check-prefix=CHECK64 %s
17-
// RUN: %clang --target=powerpc64-ibm-aix-xcoff -### -c %t.s -G 0 2>&1 | FileCheck --check-prefix=CHECK64 %s
18-
// RUN: %clang --target=powerpc64-ibm-aix-xcoff -### -o dummy.so %t.o -G 0 2>&1 | FileCheck --check-prefix=CHECK64 %s
17+
// RUN: not %clang --target=powerpc64-ibm-aix-xcoff -### -c %t.s -G 0 2>&1 | FileCheck --check-prefix=CHECK64 %s
18+
// RUN: not %clang --target=powerpc64-ibm-aix-xcoff -### -o dummy.so %t.o -G 0 2>&1 | FileCheck --check-prefix=CHECK64 %s
1919

2020
// CHECK32: error: unsupported option '-G' for target 'powerpc-ibm-aix-xcoff'
2121
// CHECK64: error: unsupported option '-G' for target 'powerpc64-ibm-aix-xcoff'

clang/test/Driver/aix-ld.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,7 @@
10711071
// CHECK-FOPENMP: "-lc"
10721072

10731073
// Check powerpc-ibm-aix7.1.0.0, 32-bit. -fopenmp=libfoo results an error.
1074-
// RUN: %clang %s 2>&1 -### \
1074+
// RUN: not %clang %s 2>&1 -### \
10751075
// RUN: --target=powerpc-ibm-aix7.1.0.0 \
10761076
// RUN: --sysroot %S/Inputs/aix_ppc_tree \
10771077
// RUN: -fopenmp=libfoo \

clang/test/Driver/aix-link-options-on-non-aix.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/// AIX-specific link options are rejected for other targets.
2-
// RUN: %clang -### --target=powerpc64-unknown-linux-gnu \
2+
// RUN: not %clang -### --target=powerpc64-unknown-linux-gnu \
33
// RUN: --sysroot %S/Inputs/aix_ppc_tree --unwindlib=libunwind --rtlib=compiler-rt \
44
// RUN: -b one -K -mxcoff-build-id=a %s 2>&1 | FileCheck %s --implicit-check-not=error:
5-
// RUN: %clang -### --target=powerpc64-unknown-linux-gnu -c \
5+
// RUN: not %clang -### --target=powerpc64-unknown-linux-gnu -c \
66
// RUN: --sysroot %S/Inputs/aix_ppc_tree --unwindlib=libunwind --rtlib=compiler-rt \
77
// RUN: -b one -K -mxcoff-build-id=a %s 2>&1 | FileCheck %s --implicit-check-not=error:
88
// CHECK: error: unsupported option '-b' for target '{{.*}}'

clang/test/Driver/aix-maix.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
// RUN: %clang -target powerpc64-ibm-aix -maix32 -### -c %s 2>&1 | \
77
// RUN: FileCheck --check-prefix=CHECK32 %s
88

9-
// RUN: %clang --target=powerpc-unknown-linux -maix64 -### -c %s 2>&1 | \
9+
// RUN: not %clang --target=powerpc-unknown-linux -maix64 -### -c %s 2>&1 | \
1010
// RUN: FileCheck --check-prefix=ERROR %s
1111

12-
// RUN: %clang --target=powerpc64-unknown-linux -maix32 -### -c %s 2>&1 | \
12+
// RUN: not %clang --target=powerpc64-unknown-linux -maix32 -### -c %s 2>&1 | \
1313
// RUN: FileCheck --check-prefix=ERROR %s
1414

1515
// CHECK32: Target: powerpc-ibm-aix

clang/test/Driver/aix-quadword-atomics-abi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %clang -### -target powerpc-unknown-aix -S %s 2>&1 | FileCheck %s
22
// RUN: %clang -### -target powerpc64-unknown-aix -S %s 2>&1 | FileCheck %s
3-
// RUN: %clang -### --target=powerpc-unknown-aix -mabi=quadword-atomics -S \
3+
// RUN: not %clang -### --target=powerpc-unknown-aix -mabi=quadword-atomics -S \
44
// RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-UNSUPPORTED-TARGET %s
55
// RUN: %clang -### -target powerpc64-unknown-aix -mabi=quadword-atomics -S \
66
// RUN: %s 2>&1 | FileCheck %s --check-prefix=CHECK-QUADWORD-ATOMICS

clang/test/Driver/amdgpu-hip-system-arch.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,22 @@
1212
// RUN: chmod +x %t/amdgpu_arch_empty
1313

1414
// case when amdgpu-arch returns nothing or fails
15-
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-arch=native --amdgpu-arch-tool=%t/amdgpu_arch_fail -x hip %s 2>&1 \
15+
// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-arch=native --amdgpu-arch-tool=%t/amdgpu_arch_fail -x hip %s 2>&1 \
1616
// RUN: | FileCheck %s --check-prefix=NO-OUTPUT-ERROR
17-
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-new-driver --offload-arch=native --amdgpu-arch-tool=%t/amdgpu_arch_fail -x hip %s 2>&1 \
17+
// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-new-driver --offload-arch=native --amdgpu-arch-tool=%t/amdgpu_arch_fail -x hip %s 2>&1 \
1818
// RUN: | FileCheck %s --check-prefix=NO-OUTPUT-ERROR
1919
// NO-OUTPUT-ERROR: error: cannot determine amdgcn architecture{{.*}}; consider passing it via '--offload-arch'
2020

2121
// case when amdgpu-arch does not return anything with successful execution
22-
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-arch=native --amdgpu-arch-tool=%t/amdgpu_arch_empty -x hip %s 2>&1 \
22+
// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-arch=native --amdgpu-arch-tool=%t/amdgpu_arch_empty -x hip %s 2>&1 \
2323
// RUN: | FileCheck %s --check-prefix=EMPTY-OUTPUT
24-
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-new-driver --offload-arch=native --amdgpu-arch-tool=%t/amdgpu_arch_empty -x hip %s 2>&1 \
24+
// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-new-driver --offload-arch=native --amdgpu-arch-tool=%t/amdgpu_arch_empty -x hip %s 2>&1 \
2525
// RUN: | FileCheck %s --check-prefix=EMPTY-OUTPUT
2626
// EMPTY-OUTPUT: error: cannot determine amdgcn architecture: No AMD GPU detected in the system; consider passing it via '--offload-arch'
2727

2828
// case when amdgpu-arch returns a gfx906 GPU.
29-
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-arch=native --amdgpu-arch-tool=%t/amdgpu_arch_gfx906 -x hip %s 2>&1 \
29+
// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-arch=native --amdgpu-arch-tool=%t/amdgpu_arch_gfx906 -x hip %s 2>&1 \
3030
// RUN: | FileCheck %s --check-prefix=ARCH-GFX906
31-
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-new-driver --offload-arch=native --amdgpu-arch-tool=%t/amdgpu_arch_gfx906 -x hip %s 2>&1 \
31+
// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-new-driver --offload-arch=native --amdgpu-arch-tool=%t/amdgpu_arch_gfx906 -x hip %s 2>&1 \
3232
// RUN: | FileCheck %s --check-prefix=ARCH-GFX906
3333
// ARCH-GFX906: "-cc1" "-triple" "amdgcn-amd-amdhsa"{{.*}}"-target-cpu" "gfx906"

clang/test/Driver/amdgpu-openmp-system-arch-fail.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
// RUN: chmod +x %t/amdgpu_arch_empty
1414

1515
// case when amdgpu_arch returns nothing or fails
16-
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp -fopenmp-targets=amdgcn-amd-amdhsa -nogpulib --amdgpu-arch-tool=%t/amdgpu_arch_fail %s 2>&1 \
16+
// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp -fopenmp-targets=amdgcn-amd-amdhsa -nogpulib --amdgpu-arch-tool=%t/amdgpu_arch_fail %s 2>&1 \
1717
// RUN: | FileCheck %s --check-prefix=NO-OUTPUT-ERROR
1818
// NO-OUTPUT-ERROR: error: cannot determine amdgcn architecture{{.*}}; consider passing it via '-march'
1919

2020
// case when amdgpu_arch does not return anything with successful execution
21-
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp -fopenmp-targets=amdgcn-amd-amdhsa -nogpulib --amdgpu-arch-tool=%t/amdgpu_arch_empty %s 2>&1 \
21+
// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp -fopenmp-targets=amdgcn-amd-amdhsa -nogpulib --amdgpu-arch-tool=%t/amdgpu_arch_empty %s 2>&1 \
2222
// RUN: | FileCheck %s --check-prefix=EMPTY-OUTPUT
2323
// EMPTY-OUTPUT: error: cannot determine amdgcn architecture: No AMD GPU detected in the system; consider passing it via '-march'

clang/test/Driver/apple-kext-mkernel.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
// CHECK-X86-2: "-fno-rtti"
1414
// CHECK-X86-2-NOT: "-fno-common"
1515

16-
// RUN: %clang -target x86_64-apple-darwin11 -arch armv7 -mkernel -mstrict-align -### -fsyntax-only %s 2>&1 | FileCheck --check-prefix=CHECK-ARM %s
17-
// RUN: %clang -target x86_64-apple-darwin11 -arch armv7 -mkernel -mstrict-align -### -fsyntax-only -fbuiltin -fno-builtin -fcommon -fno-common %s 2>&1 | FileCheck --check-prefix=CHECK-ARM %s
16+
// RUN: not %clang -target x86_64-apple-darwin11 -arch armv7 -mkernel -mstrict-align -### -fsyntax-only %s 2>&1 | FileCheck --check-prefix=CHECK-ARM %s
17+
// RUN: not %clang -target x86_64-apple-darwin11 -arch armv7 -mkernel -mstrict-align -### -fsyntax-only -fbuiltin -fno-builtin -fcommon -fno-common %s 2>&1 | FileCheck --check-prefix=CHECK-ARM %s
1818

1919
// CHECK-ARM: "-target-feature" "+long-calls"
2020
// CHECK-ARM: "-target-feature" "+strict-align"

clang/test/Driver/arclite-link-external-toolchain.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: rm -rf %t.tmpdir
22
// RUN: mkdir -p %t.tmpdir/Xcode.app/Contents/Developers/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
3-
// RUN: %clang -### -target x86_64-apple-macos10.10 -fobjc-link-runtime -lfoo \
3+
// RUN: not %clang -### -target x86_64-apple-macos10.10 -fobjc-link-runtime -lfoo \
44
// RUN: -isysroot %t.tmpdir/Xcode.app/Contents/Developers/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk \
55
// RUN: %s 2>&1 | FileCheck %s
66

clang/test/Driver/arclite-link.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: touch %t.o
22
// RUN: mkdir -p %t.tmpdir/Xcode.app/Contents/Developers/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
3-
// RUN: %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -lfoo -mmacosx-version-min=10.10 %t.o \
3+
// RUN: not %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -lfoo -mmacosx-version-min=10.10 %t.o \
44
// RUN: -isysroot %t.tmpdir/Xcode.app/Contents/Developers/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk 2>&1 | FileCheck -check-prefix=CHECK-ARCLITE-OSX %s
55
// RUN: %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -mmacosx-version-min=10.11 %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOARCLITE %s
66
// RUN: %clang -### -target i386-apple-darwin10 -fobjc-link-runtime -mmacosx-version-min=10.7 %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOARCLITE %s
@@ -16,7 +16,7 @@
1616
// CHECK-NOARCLITE-NOT: libarclite
1717
// CHECK-NOSTDLIB-NOT: -lobjc
1818

19-
// RUN: %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -fobjc-arc -mmacosx-version-min=10.10 %s 2>&1 | FileCheck -check-prefix=CHECK-UNUSED %s
19+
// RUN: not %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -fobjc-arc -mmacosx-version-min=10.10 %s 2>&1 | FileCheck -check-prefix=CHECK-UNUSED %s
2020

2121
// CHECK-UNUSED-NOT: warning: argument unused during compilation: '-fobjc-link-runtime'
2222

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
/// check -faapcs-bitfield-width/-fno-aapcs-bitfield-width
22
// RUN: %clang -target arm-arm-none-eabi -march=armv8-m.main -faapcs-bitfield-width -### %s 2>&1 | FileCheck --check-prefixes=WIDTH,INVERSE-WIDTH %s
3-
// RUN: %clang --target=aarch64 -march=armv8-m.main -faapcs-bitfield-width -### %s 2>&1 | FileCheck --check-prefixes=WIDTH,INVERSE-WIDTH %s
3+
// RUN: not %clang --target=aarch64 -march=armv8-m.main -faapcs-bitfield-width -### %s 2>&1 | FileCheck --check-prefixes=WIDTH,INVERSE-WIDTH %s
44
// RUN: %clang -target arm-arm-none-eabi -march=armv8-m.main -fno-aapcs-bitfield-width -### %s 2>&1 | FileCheck --check-prefixes=NO-WIDTH,WIDTH %s
5-
// RUN: %clang --target=aarch64 -march=armv8-m.main -fno-aapcs-bitfield-width -### %s 2>&1 | FileCheck --check-prefixes=NO-WIDTH,WIDTH %s
5+
// RUN: not %clang --target=aarch64 -march=armv8-m.main -fno-aapcs-bitfield-width -### %s 2>&1 | FileCheck --check-prefixes=NO-WIDTH,WIDTH %s
66
// WIDTH-NOT: -faapcs-bitfield-width
77
// NO-WIDTH: -fno-aapcs-bitfield-width
88

99
/// check -faapcs-bitfield-load
1010
// RUN: %clang -target arm-arm-none-eabi -march=armv8-m.main -faapcs-bitfield-load -### %s 2>&1 | FileCheck --check-prefix=LOAD %s
11-
// RUN: %clang --target=aarch64 -march=armv8-m.main -faapcs-bitfield-load -### %s 2>&1 | FileCheck --check-prefix=LOAD %s
11+
// RUN: not %clang --target=aarch64 -march=armv8-m.main -faapcs-bitfield-load -### %s 2>&1 | FileCheck --check-prefix=LOAD %s
1212
// LOAD: -faapcs-bitfield-load
1313

1414
/// check absence of the above argument when not given
1515
// RUN: %clang -target arm-arm-none-eabi -march=armv8-m.main -### %s 2>&1 | FileCheck --check-prefixes=INVERSE-WIDTH,INVERSE-LOAD %s
16-
// RUN: %clang --target=aarch64 -march=armv8-m.main -### %s 2>&1 | FileCheck --check-prefixes=INVERSE-WIDTH,INVERSE-LOAD %s
16+
// RUN: not %clang --target=aarch64 -march=armv8-m.main -### %s 2>&1 | FileCheck --check-prefixes=INVERSE-WIDTH,INVERSE-LOAD %s
1717
// INVERSE-WIDTH-NOT: -fno-aapcs-bitfield-width
1818
// INVERSE-LOAD-NOT: -fno-aapcs-bitfield-load

clang/test/Driver/arm-cmse-cve-2021-35465.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@
3434

3535
// Diagnose the option when used without -mcmse
3636
//
37-
// RUN: %clang --target=arm-arm-none-eabi -march=armv8-m.main %s -### \
37+
// RUN: not %clang --target=arm-arm-none-eabi -march=armv8-m.main %s -### \
3838
// RUN: -mfix-cmse-cve-2021-35465 2>&1 |\
3939
// RUN: FileCheck %s --check-prefix=CHECK-DIAG
4040
//
41-
// RUN: %clang --target=arm-arm-none-eabi -march=armv8.1-m.main %s -### \
41+
// RUN: not %clang --target=arm-arm-none-eabi -march=armv8.1-m.main %s -### \
4242
// RUN: -mno-fix-cmse-cve-2021-35465 2>&1 |\
4343
// RUN: FileCheck %s --check-prefix=CHECK-DIAG
4444
//

clang/test/Driver/arm-compiler-rt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
// RUN: | FileCheck %s -check-prefix ARM-ANDROID
4848
// ARM-ANDROID: "{{.*[/\\]}}libclang_rt.builtins-arm-android.a"
4949

50-
// RUN: %clang --target=arm-linux-androideabi \
50+
// RUN: not %clang --target=arm-linux-androideabi \
5151
// RUN: --sysroot=%S/Inputs/resource_dir_with_arch_subdir \
5252
// RUN: -resource-dir=%S/Inputs/resource_dir_with_arch_subdir \
5353
// RUN: -rtlib=compiler-rt -mfloat-abi=hard -### %s 2>&1 \

0 commit comments

Comments
 (0)