[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 https://github.com/dart-lang/sdk/issues/61377 TEST=tried building with TSAN on mac R=aam@google.com Change-Id: I75e386813621f6e15562b5d8386f2c4441773970 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/446301 Commit-Queue: Alexander Aprelev <aam@google.com> Auto-Submit: Slava Egorov <vegorov@google.com> Reviewed-by: Alexander Aprelev <aam@google.com>
This commit is contained in:
committed by
Commit Queue
parent
cc28d8ca3d
commit
4ccfbc66ce
@@ -15,7 +15,7 @@ group("deps") {
|
||||
}
|
||||
|
||||
config("sanitizer_options_link_helper") {
|
||||
ldflags = [ "-Wl,-u_sanitizer_options_link_helper" ]
|
||||
ldflags = [ "-Wl,-u,_sanitizer_options_link_helper" ]
|
||||
}
|
||||
|
||||
source_set("options_sources") {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
// Functions returning default options are declared weak in the tools' runtime
|
||||
// libraries. To make the linker pick the strong replacements for those
|
||||
// functions from this module, we explicitly force its inclusion by passing
|
||||
// -Wl,-u_sanitizer_options_link_helper
|
||||
// -Wl,-u,_sanitizer_options_link_helper
|
||||
extern "C" void _sanitizer_options_link_helper() {}
|
||||
|
||||
// The callbacks we define here will be called from the sanitizer runtime, but
|
||||
|
||||
Reference in New Issue
Block a user