Skip to content

Commit

Permalink
Disable -Wl,-z,defs in ASAN build (#21381)
Browse files Browse the repository at this point in the history
Shared libraries built with address sanitizer have some unresolved
symbols created by the instrumentation. These will be provided by
the executable.

This is by design but trips an unresolved symbol diagnostic. Disable
these strictures when ASAN is enabled.
  • Loading branch information
mspang authored Jul 29, 2022
1 parent ae2ca6d commit 21b1e5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build/config/compiler/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ config("strict_warnings") {
]
}

if (current_os == "linux" || current_os == "android") {
if (!is_asan && (current_os == "linux" || current_os == "android")) {
ldflags += [ "-Wl,-z,defs" ]
}
}
Expand Down

0 comments on commit 21b1e5a

Please sign in to comment.