diff options
author | Manoj Gupta <manojgupta@google.com> | 2019-04-03 16:49:12 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-04-05 03:53:49 -0700 |
commit | 084fa8eb1895be216dbc4170886922ec99612381 (patch) | |
tree | e0f6fb5e734f4051db495c99e44311df5b5e5f5a /BUILD.gn | |
parent | c1e4543ae2b479a54fc4eff90fb388c70a428d52 (diff) | |
download | platform_external_libchrome-084fa8eb1895be216dbc4170886922ec99612381.tar.gz platform_external_libchrome-084fa8eb1895be216dbc4170886922ec99612381.tar.bz2 platform_external_libchrome-084fa8eb1895be216dbc4170886922ec99612381.zip |
libchrome: Disable "-z,defs" for coverage builds.
Coverage builds do not like the linker flag "-z,defs" like asan.
Building libchrome with USE="coverage fuzzer" results in linker errors:
../../../libchrome-462023/platform2/libchrome/base/debug/activity_tracker.cc:152:
error: undefined reference to '__sanitizer_cov_trace_cmp4'
../../../libchrome-462023/platform2/libchrome/base/debug/activity_tracker.cc:572:
error: undefined reference to '__sanitizer_cov_trace_const_cmp2'
../../../libchrome-462023/platform2/libchrome/base/logging.h:703:
error: undefined reference to '__sanitizer_cov_trace_const_cmp2'
BUG=chromium:949338
TEST=libchrome buidls with coverage flags.
Change-Id: I79bc776eb152983bb54d122a307be8cfab7bbcba
Reviewed-on: https://chromium-review.googlesource.com/1551650
Commit-Ready: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Caroline Tice <cmtice@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Diffstat (limited to 'BUILD.gn')
-rw-r--r-- | BUILD.gn | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -31,8 +31,8 @@ config("libchrome_config") { "-Wno-unused-local-typedefs", "-Xclang-only=-Wno-char-subscripts", ] - # Address sanitizer builds do not support -z,defs. - if (!use.asan) { + # Address sanitizer + coverage builds do not support -z,defs. + if (!(use.asan || use.coverage)) { ldflags = [ "-Wl,-z,defs" ] } } |