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 and pull[bot] committed Jun 22, 2023
1 parent 3f4ef80 commit 1096068
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 1096068

Please sign in to comment.