[clang] 9f43a41 - [Driver,test] Make Android runtime tests resisent to #87866 change
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Sun Apr 14 17:04:09 PDT 2024
Author: Fangrui Song
Date: 2024-04-14T17:04:03-07:00
New Revision: 9f43a41db37253685c5ed428c215528eb92bbd43
URL: https://github.com/llvm/llvm-project/commit/9f43a41db37253685c5ed428c215528eb92bbd43
DIFF: https://github.com/llvm/llvm-project/commit/9f43a41db37253685c5ed428c215528eb92bbd43.diff
LOG: [Driver,test] Make Android runtime tests resisent to #87866 change
Suggested by YunQiang Su <syq at debian.org>
Added:
Modified:
clang/test/Driver/linux-ld.c
clang/test/Driver/sanitizer-ld.c
Removed:
################################################################################
diff --git a/clang/test/Driver/linux-ld.c b/clang/test/Driver/linux-ld.c
index 4020b138dc8fde..f4e40439a5f313 100644
--- a/clang/test/Driver/linux-ld.c
+++ b/clang/test/Driver/linux-ld.c
@@ -92,6 +92,7 @@
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=arm-linux-androideabi \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: -resource-dir=%S/Inputs/resource_dir \
// RUN: --rtlib=compiler-rt \
// RUN: | FileCheck --check-prefix=CHECK-LD-RT-ANDROID %s
// CHECK-LD-RT-ANDROID-NOT: warning:
@@ -262,6 +263,7 @@
// RUN: %clang -static -### %s -no-pie 2>&1 \
// RUN: --target=aarch64-linux-android -rtlib=platform --unwindlib=platform \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
+// RUN: -resource-dir=%S/Inputs/resource_dir \
// RUN: | FileCheck --check-prefix=CHECK-CLANG-ANDROID-STATIC %s
// CHECK-CLANG-ANDROID-STATIC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
// CHECK-CLANG-ANDROID-STATIC: "--start-group" "{{[^"]*}}{{/|\\\\}}libclang_rt.builtins-aarch64-android.a" "-l:libunwind.a" "-lc" "--end-group"
diff --git a/clang/test/Driver/sanitizer-ld.c b/clang/test/Driver/sanitizer-ld.c
index 53e536d7729248..f4ac484d6e4cb1 100644
--- a/clang/test/Driver/sanitizer-ld.c
+++ b/clang/test/Driver/sanitizer-ld.c
@@ -177,6 +177,7 @@
// RUN: %clang -### %s 2>&1 \
// RUN: --target=arm-linux-androideabi -fuse-ld=ld -fsanitize=address \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: -resource-dir=%S/Inputs/resource_dir \
// RUN: | FileCheck --check-prefix=CHECK-ASAN-ANDROID %s
//
// CHECK-ASAN-ANDROID: "{{(.*[^.0-9A-Z_a-z])?}}ld.lld{{(.exe)?}}"
@@ -191,6 +192,7 @@
// RUN: %clang -### %s 2>&1 \
// RUN: --target=arm-linux-androideabi -fuse-ld=ld -fsanitize=address \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: -resource-dir=%S/Inputs/resource_dir \
// RUN: -static-libsan \
// RUN: | FileCheck --check-prefix=CHECK-ASAN-ANDROID-STATICLIBASAN %s
//
@@ -203,6 +205,7 @@
// RUN: %clang -### %s 2>&1 \
// RUN: --target=arm-linux-androideabi -fuse-ld=ld -fsanitize=undefined \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: -resource-dir=%S/Inputs/resource_dir \
// RUN: | FileCheck --check-prefix=CHECK-UBSAN-ANDROID %s
//
// CHECK-UBSAN-ANDROID: "{{(.*[^.0-9A-Z_a-z])?}}ld.lld{{(.exe)?}}"
@@ -217,6 +220,7 @@
// RUN: %clang -### %s 2>&1 \
// RUN: --target=arm-linux-androideabi -fuse-ld=ld -fsanitize=undefined \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: -resource-dir=%S/Inputs/resource_dir \
// RUN: -static-libsan \
// RUN: | FileCheck --check-prefix=CHECK-UBSAN-ANDROID-STATICLIBASAN %s
//
@@ -230,6 +234,7 @@
// RUN: %clang -### %s 2>&1 \
// RUN: --target=i686-linux-android -fuse-ld=ld -fsanitize=address \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: -resource-dir=%S/Inputs/resource_dir \
// RUN: | FileCheck --check-prefix=CHECK-ASAN-ANDROID-X86 %s
//
// CHECK-ASAN-ANDROID-X86: "{{(.*[^.0-9A-Z_a-z])?}}ld.lld{{(.exe)?}}"
@@ -252,6 +257,7 @@
// RUN: %clang -### %s 2>&1 \
// RUN: --target=arm-linux-androideabi -fuse-ld=ld -fsanitize=address \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: -resource-dir=%S/Inputs/resource_dir \
// RUN: -shared \
// RUN: | FileCheck --check-prefix=CHECK-ASAN-ANDROID-SHARED %s
//
More information about the cfe-commits
mailing list