mgorny created this revision. mgorny added a reviewer: eugenis. Herald added subscribers: dberris, srhines. mgorny added inline comments.
================ Comment at: test/Driver/sanitizer-ld.c:517 // CHECK-CFI-CROSS-DSO-ANDROID: "{{.*}}ld{{(.exe)?}}" // CHECK-CFI-CROSS-DSO-ANDROID-NOT: libclang_rt. ---------------- (an alternative would be to replace this 'NOT' clause with more specific library name — but I don't know which library could 'accidentally' appear here) Fix the CHECK-CFI-CROSS-DSO-ANDROID test to force -rtlib=libgcc. Otherwise, if clang is built with CLANG_DEFAULT_RTLIB=compiler-rt, the clang_rt.builtins library gets added to the command-line and causes the 'clang_rt.' substring to unexpectedly match. Repository: rC Clang https://reviews.llvm.org/D44645 Files: test/Driver/sanitizer-ld.c Index: test/Driver/sanitizer-ld.c =================================================================== --- test/Driver/sanitizer-ld.c +++ test/Driver/sanitizer-ld.c @@ -510,7 +510,7 @@ // Cross-DSO CFI on Android does not link runtime libraries. // RUN: %clang -fsanitize=cfi -fsanitize-cfi-cross-dso %s -### -o %t.o 2>&1 \ -// RUN: -target aarch64-linux-android -fuse-ld=ld \ +// RUN: -target aarch64-linux-android -fuse-ld=ld -rtlib=libgcc \ // RUN: --sysroot=%S/Inputs/basic_android_tree \ // RUN: | FileCheck --check-prefix=CHECK-CFI-CROSS-DSO-ANDROID %s // CHECK-CFI-CROSS-DSO-ANDROID: "{{.*}}ld{{(.exe)?}}"
Index: test/Driver/sanitizer-ld.c =================================================================== --- test/Driver/sanitizer-ld.c +++ test/Driver/sanitizer-ld.c @@ -510,7 +510,7 @@ // Cross-DSO CFI on Android does not link runtime libraries. // RUN: %clang -fsanitize=cfi -fsanitize-cfi-cross-dso %s -### -o %t.o 2>&1 \ -// RUN: -target aarch64-linux-android -fuse-ld=ld \ +// RUN: -target aarch64-linux-android -fuse-ld=ld -rtlib=libgcc \ // RUN: --sysroot=%S/Inputs/basic_android_tree \ // RUN: | FileCheck --check-prefix=CHECK-CFI-CROSS-DSO-ANDROID %s // CHECK-CFI-CROSS-DSO-ANDROID: "{{.*}}ld{{(.exe)?}}"
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits