File tree Expand file tree Collapse file tree 2 files changed +27
-3
lines changed Expand file tree Collapse file tree 2 files changed +27
-3
lines changed Original file line number Diff line number Diff line change @@ -1157,9 +1157,9 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC,
1157
1157
!TC.getTriple ().isAndroid () && !TC.getTriple ().isOSFuchsia ();
1158
1158
}
1159
1159
1160
- LinkRuntimes =
1161
- Args. hasFlag ( options::OPT_fsanitize_link_runtime ,
1162
- options::OPT_fno_sanitize_link_runtime, LinkRuntimes );
1160
+ LinkRuntimes = Args. hasFlag (options::OPT_fsanitize_link_runtime,
1161
+ options::OPT_fno_sanitize_link_runtime ,
1162
+ !Args. hasArg ( options::OPT_r) );
1163
1163
1164
1164
// Parse -link-cxx-sanitizer flag.
1165
1165
LinkCXXRuntimes = D.CCCIsCXX ();
Original file line number Diff line number Diff line change 1369
1369
// CHECK-DSO-SHARED-HWASAN-AARCH64-LINUX-NOT: "-lresolv"
1370
1370
// CHECK-DSO-SHARED-HWASAN-AARCH64-LINUX-NOT: "--export-dynamic"
1371
1371
// CHECK-DSO-SHARED-HWASAN-AARCH64-LINUX-NOT: "--dynamic-list"
1372
+
1373
+ // RUN: %clang -fsanitize=address,undefined -r -### %s 2>&1 \
1374
+ // RUN: --target=x86_64-unknown-linux -fuse-ld=ld \
1375
+ // RUN: -resource-dir=%S/Inputs/resource_dir \
1376
+ // RUN: --sysroot=%S/Inputs/basic_linux_tree \
1377
+ // RUN: | %{filecheck} --check-prefix=CHECK-RELOCATABLE-LINK-ASAN-UBSAN-RTLIB
1378
+ //
1379
+ // CHECK-RELOCATABLE-LINK-ASAN-UBSAN-RTLIB-NOT: "{{.*}}(asan|ubsan){{.*}}"
1380
+
1381
+ // RUN: %clang -fsanitize=address -r -fsanitize-link-runtime -### %s 2>&1 \
1382
+ // RUN: --target=x86_64-unknown-linux -fuse-ld=ld \
1383
+ // RUN: -resource-dir=%S/Inputs/resource_dir \
1384
+ // RUN: --sysroot=%S/Inputs/basic_linux_tree \
1385
+ // RUN: | FileCheck %s --check-prefix=CHECK-RELOCATABLE-LINK-FORCE-LINK-ASAN
1386
+ //
1387
+ // CHECK-RELOCATABLE-LINK-FORCE-LINK-ASAN: "{{.*}}asan{{.*}}"
1388
+
1389
+ // RUN: %clang -fsanitize=thread -r -### %s 2>&1 \
1390
+ // RUN: --target=x86_64-unknown-linux -fuse-ld=ld \
1391
+ // RUN: -resource-dir=%S/Inputs/resource_dir \
1392
+ // RUN: --sysroot=%S/Inputs/basic_linux_tree \
1393
+ // RUN: | %{filecheck} --check-prefix=CHECK-RELOCATABLE-LINK-TSAN-RTLIB
1394
+ //
1395
+ // CHECK-RELOCATABLE-LINK-TSAN-RTLIB-NOT: "{{.*}}tsan{{.*}}"
You can’t perform that action at this time.
0 commit comments