Skip to content

Commit

Permalink
Disable -Wl,-z,defs in ASAN build (project-chip#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 isiu-apple committed Sep 16, 2022
1 parent f78dc37 commit 7fc1058
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 7fc1058

Please sign in to comment.