Skip to content

Commit 1cdf67a

Browse files
rmacnak-googleCommit Queue
authored andcommitted
[infra] Adjust rpath so TSAN works with shards not having resources at the same absolute path.
Change-Id: I3629f4b9de1270cef648dc938084ecf73ba1863e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/447420 Reviewed-by: Alexander Aprelev <[email protected]> Commit-Queue: Ryan Macnak <[email protected]>
1 parent 5492cfd commit 1cdf67a

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

build/config/compiler/BUILD.gn

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,6 @@ config("compiler") {
112112
if (is_asan) {
113113
cflags += [ "-fsanitize=address" ]
114114
ldflags += [ "-fsanitize=address" ]
115-
if (is_mac) {
116-
ldflags += [
117-
"-rpath",
118-
"buildtools/mac-$host_cpu/clang/lib/clang/21/lib/darwin",
119-
]
120-
}
121115
}
122116
if (is_hwasan && is_android && current_cpu == "arm64") {
123117
cflags += [ "-fsanitize=hwaddress" ]
@@ -148,6 +142,13 @@ config("compiler") {
148142
]
149143
}
150144

145+
if (is_mac && (is_asan || is_lsan || is_tsan || is_ubsan)) {
146+
ldflags += [
147+
"-rpath",
148+
"buildtools/mac-$host_cpu/clang/lib/clang/21/lib/darwin",
149+
]
150+
}
151+
151152
if (use_custom_libcxx) {
152153
cflags_cc += [ "-nostdinc++" ]
153154
include_dirs = [

0 commit comments

Comments
 (0)