Commit 4b6510dc authored by Mirko Bonadei's avatar Mirko Bonadei Committed by Commit Bot

Removing definition of lsan macros from Abseil BUILD.gn files.

Sanitizers macros should never be defined in a project BUILD.gn files.

Bug: 852817
Change-Id: I55597f31042ebeaf6aae8c8670892a9ba7f49417
Reviewed-on: https://chromium-review.googlesource.com/1102566Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Mirko Bonadei <mbonadei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567679}
parent e9c5a518
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
# WARNING: This file is automatically generated. # WARNING: This file is automatically generated.
import("//build_overrides/build.gni") import("//build_overrides/build.gni")
import("//build/config/sanitizers/sanitizers.gni")
if (build_with_chromium) { if (build_with_chromium) {
visibility = [ visibility = [
...@@ -184,42 +185,42 @@ source_set("leak_check_disable") { ...@@ -184,42 +185,42 @@ source_set("leak_check_disable") {
] ]
} }
source_set("leak_check_api_enabled_for_testing") { if (is_lsan) {
testonly = true source_set("leak_check_api_enabled_for_testing") {
configs -= [ "//build/config/compiler:chromium_code" ] testonly = true
configs += [ configs -= [ "//build/config/compiler:chromium_code" ]
"//build/config/compiler:no_chromium_code", configs += [
"//third_party/abseil-cpp:absl_default_cflags_cc", "//build/config/compiler:no_chromium_code",
] "//third_party/abseil-cpp:absl_default_cflags_cc",
cflags_cc = [ "-DLEAK_SANITIZER" ] ]
public_configs = [ "//third_party/abseil-cpp:absl_include_config" ] public_configs = [ "//third_party/abseil-cpp:absl_include_config" ]
sources = [ sources = [
"leak_check.cc", "leak_check.cc",
] ]
public = [ public = [
"leak_check.h", "leak_check.h",
] ]
visibility = [] visibility = []
visibility += [ ":*" ] visibility += [ ":*" ]
} }
} else {
source_set("leak_check_api_disabled_for_testing") { source_set("leak_check_api_disabled_for_testing") {
testonly = true testonly = true
configs -= [ "//build/config/compiler:chromium_code" ] configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ configs += [
"//build/config/compiler:no_chromium_code", "//build/config/compiler:no_chromium_code",
"//third_party/abseil-cpp:absl_default_cflags_cc", "//third_party/abseil-cpp:absl_default_cflags_cc",
] ]
cflags_cc = [ "-ULEAK_SANITIZER" ] public_configs = [ "//third_party/abseil-cpp:absl_include_config" ]
public_configs = [ "//third_party/abseil-cpp:absl_include_config" ] sources = [
sources = [ "leak_check.cc",
"leak_check.cc", ]
] public = [
public = [ "leak_check.h",
"leak_check.h", ]
] visibility = []
visibility = [] visibility += [ ":*" ]
visibility += [ ":*" ] }
} }
source_set("stack_consumption") { source_set("stack_consumption") {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment