|
830 | 830 | // CHECK-NSAN-UBSAN: "--whole-archive" "{{[^"]*}}libclang_rt.nsan.a" "--no-whole-archive"
|
831 | 831 |
|
832 | 832 | // CFI by itself does not link runtime libraries.
|
833 |
| -// RUN: not %clang -fsanitize=cfi -### %s 2>&1 \ |
| 833 | +// RUN: not %clang -fsanitize=cfi \ |
834 | 834 | // RUN: --target=x86_64-unknown-linux -fuse-ld=ld -rtlib=platform \
|
835 | 835 | // RUN: -resource-dir=%S/Inputs/resource_dir \
|
836 | 836 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
| 837 | +// RUN: -### %s 2>&1 \ |
837 | 838 | // RUN: | %{filecheck} --check-prefix=CHECK-CFI-LINUX
|
838 | 839 | // CHECK-CFI-LINUX: "{{.*}}ld{{(.exe)?}}"
|
839 | 840 |
|
840 | 841 | // CFI with diagnostics links the UBSan runtime.
|
841 | 842 | // RUN: not %clang -fsanitize=cfi -fno-sanitize-trap=cfi -fsanitize-recover=cfi \
|
842 |
| -// RUN: -### %s 2>&1\ |
843 | 843 | // RUN: --target=x86_64-unknown-linux -fuse-ld=ld \
|
844 | 844 | // RUN: -resource-dir=%S/Inputs/resource_dir \
|
845 | 845 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
| 846 | +// RUN: -### %s 2>&1 \ |
846 | 847 | // RUN: | %{filecheck} --check-prefix=CHECK-CFI-DIAG-LINUX
|
847 | 848 | // CHECK-CFI-DIAG-LINUX: "{{.*}}ld{{(.exe)?}}"
|
848 | 849 | // CHECK-CFI-DIAG-LINUX: "--whole-archive" "{{[^"]*}}libclang_rt.ubsan_standalone.a" "--no-whole-archive"
|
849 | 850 |
|
850 | 851 | // Cross-DSO CFI links the CFI runtime.
|
851 |
| -// RUN: not %clang -fsanitize=cfi -fsanitize-cfi-cross-dso -### %s 2>&1 \ |
| 852 | +// RUN: not %clang -fsanitize=cfi -fsanitize-cfi-cross-dso \ |
852 | 853 | // RUN: --target=x86_64-unknown-linux -fuse-ld=ld \
|
853 | 854 | // RUN: -resource-dir=%S/Inputs/resource_dir \
|
854 | 855 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
| 856 | +// RUN: -### %s 2>&1 \ |
855 | 857 | // RUN: | %{filecheck} --check-prefix=CHECK-CFI-CROSS-DSO-LINUX
|
856 | 858 | // CHECK-CFI-CROSS-DSO-LINUX: "{{.*}}ld{{(.exe)?}}"
|
857 | 859 | // CHECK-CFI-CROSS-DSO-LINUX: "--whole-archive" "{{[^"]*}}libclang_rt.cfi.a" "--no-whole-archive"
|
858 | 860 | // CHECK-CFI-CROSS-DSO-LINUX: -export-dynamic
|
859 | 861 |
|
860 | 862 | // Cross-DSO CFI with diagnostics links just the CFI runtime.
|
861 |
| -// RUN: not %clang -fsanitize=cfi -fsanitize-cfi-cross-dso -### %s 2>&1 \ |
| 863 | +// RUN: not %clang -fsanitize=cfi -fsanitize-cfi-cross-dso \ |
862 | 864 | // RUN: -fno-sanitize-trap=cfi -fsanitize-recover=cfi \
|
863 | 865 | // RUN: --target=x86_64-unknown-linux -fuse-ld=ld \
|
864 | 866 | // RUN: -resource-dir=%S/Inputs/resource_dir \
|
865 | 867 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
| 868 | +// RUN: -### %s 2>&1 \ |
866 | 869 | // RUN: | %{filecheck} --check-prefix=CHECK-CFI-CROSS-DSO-DIAG-LINUX
|
867 | 870 | // CHECK-CFI-CROSS-DSO-DIAG-LINUX: "{{.*}}ld{{(.exe)?}}"
|
868 | 871 | // CHECK-CFI-CROSS-DSO-DIAG-LINUX: "--whole-archive" "{{[^"]*}}libclang_rt.cfi_diag.a" "--no-whole-archive"
|
869 | 872 | // CHECK-CFI-CROSS-DSO-DIAG-LINUX: -export-dynamic
|
870 | 873 |
|
871 | 874 | // Cross-DSO CFI on Android does not link runtime libraries.
|
872 |
| -// RUN: not %clang -fsanitize=cfi -fsanitize-cfi-cross-dso -### %s 2>&1 \ |
| 875 | +// RUN: not %clang -fsanitize=cfi -fsanitize-cfi-cross-dso \ |
873 | 876 | // RUN: --target=aarch64-linux-android -fuse-ld=ld \
|
874 | 877 | // RUN: -resource-dir=%S/Inputs/resource_dir \
|
875 | 878 | // RUN: --sysroot=%S/Inputs/basic_android_tree \
|
| 879 | +// RUN: -### %s 2>&1 \ |
876 | 880 | // RUN: | %{filecheck} --check-prefix=CHECK-CFI-CROSS-DSO-ANDROID
|
877 | 881 | // CHECK-CFI-CROSS-DSO-ANDROID: "{{.*}}ld{{(.exe)?}}"
|
878 | 882 |
|
879 | 883 | // Cross-DSO CFI with diagnostics on Android links just the UBSAN runtime.
|
880 |
| -// RUN: not %clang -fsanitize=cfi -fsanitize-cfi-cross-dso -### %s 2>&1 \ |
| 884 | +// RUN: not %clang -fsanitize=cfi -fsanitize-cfi-cross-dso \ |
881 | 885 | // RUN: -fno-sanitize-trap=cfi -fsanitize-recover=cfi \
|
882 | 886 | // RUN: --target=aarch64-linux-android -fuse-ld=ld \
|
883 | 887 | // RUN: -resource-dir=%S/Inputs/resource_dir \
|
884 | 888 | // RUN: --sysroot=%S/Inputs/basic_android_tree \
|
| 889 | +// RUN: -### %s 2>&1 \ |
885 | 890 | // RUN: | %{filecheck} --check-prefix=CHECK-CFI-CROSS-DSO-DIAG-ANDROID
|
886 | 891 | // CHECK-CFI-CROSS-DSO-DIAG-ANDROID: "{{.*}}ld{{(.exe)?}}"
|
887 | 892 | // CHECK-CFI-CROSS-DSO-DIAG-ANDROID: "{{[^"]*}}libclang_rt.ubsan_standalone.so"
|
|
0 commit comments