Skip to content

Commit 4ccfbc6

Browse files
mralephCommit Queue
authored andcommitted
[build] Fix sanitizer build on Mac.
It seems on Linux linker parses -usymbol as -u symbol, but the same does not get parsed on Mac - it interprets the whole thing as a name of a flag and gets confused. Fixes #61377 TEST=tried building with TSAN on mac [email protected] Change-Id: I75e386813621f6e15562b5d8386f2c4441773970 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/446301 Commit-Queue: Alexander Aprelev <[email protected]> Auto-Submit: Slava Egorov <[email protected]> Reviewed-by: Alexander Aprelev <[email protected]>
1 parent cc28d8c commit 4ccfbc6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

build/config/sanitizers/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ group("deps") {
1515
}
1616

1717
config("sanitizer_options_link_helper") {
18-
ldflags = [ "-Wl,-u_sanitizer_options_link_helper" ]
18+
ldflags = [ "-Wl,-u,_sanitizer_options_link_helper" ]
1919
}
2020

2121
source_set("options_sources") {

build/sanitizers/sanitizer_options.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// Functions returning default options are declared weak in the tools' runtime
99
// libraries. To make the linker pick the strong replacements for those
1010
// functions from this module, we explicitly force its inclusion by passing
11-
// -Wl,-u_sanitizer_options_link_helper
11+
// -Wl,-u,_sanitizer_options_link_helper
1212
extern "C" void _sanitizer_options_link_helper() {}
1313

1414
// The callbacks we define here will be called from the sanitizer runtime, but

0 commit comments

Comments
 (0)