Index: build/config/sanitizers/BUILD.gn |
diff --git a/build/config/sanitizers/BUILD.gn b/build/config/sanitizers/BUILD.gn |
index f6b88c718941ac3437109bbe9b3b2ed9db93b8e3..67d9568c22cb7d380c0fc071f794f294e1c455e5 100644 |
--- a/build/config/sanitizers/BUILD.gn |
+++ b/build/config/sanitizers/BUILD.gn |
@@ -18,9 +18,6 @@ if (is_ios) { |
# "//build/config:exe_and_shlib_deps" to pull in this target. |
group("deps") { |
visibility = [ "//build/config:exe_and_shlib_deps" ] |
- public_deps = [ |
- ":deps_no_options", |
- ] |
if (using_sanitizer) { |
public_configs = [ |
":sanitizer_options_link_helper", |
@@ -33,32 +30,15 @@ group("deps") { |
deps = [ |
":options_sources", |
] |
- } |
- if (use_afl) { |
- deps += [ "//third_party/afl" ] |
- } |
-} |
- |
-group("deps_no_options") { |
- if (using_sanitizer) { |
- public_configs = [ |
- # Even when a target removes default_sanitizer_flags, it may be depending |
- # on a library that did not remove default_sanitizer_flags. Thus, we need |
- # to add the ldflags here as well as in default_sanitizer_flags. |
- ":default_sanitizer_ldflags", |
- ] |
- deps = [] |
- public_deps = [] |
- |
- data = [ |
- "//tools/valgrind/asan/", |
- ] |
if (is_win) { |
exe = ".exe" |
} else { |
exe = "" |
} |
- data += [ "$clang_base_path/bin/llvm-symbolizer${exe}" ] |
+ data = [ |
+ "//tools/valgrind/asan/", |
+ "$clang_base_path/bin/llvm-symbolizer${exe}", |
+ ] |
if (is_linux) { |
# llvm-symbolizer needs this. |
data += [ "$clang_base_path/lib/libstdc++.so.6" ] |
@@ -68,10 +48,6 @@ group("deps_no_options") { |
use_locally_built_instrumented_libraries) { |
deps += [ "//third_party/instrumented_libraries:deps" ] |
} |
- if (use_custom_libcxx) { |
- public_deps += [ "//buildtools/third_party/libc++:libcxx_proxy" ] |
- data += [ "$root_out_dir/libc++.so" ] |
- } |
# ASAN is supported on iOS but the runtime library depends on the compiler |
# used (Chromium version of clang versus Xcode version of clang). Only copy |
@@ -82,7 +58,9 @@ group("deps_no_options") { |
] |
} |
if (is_mac || (is_ios && !use_xcode_clang)) { |
- public_deps += [ ":asan_runtime_bundle_data" ] |
+ public_deps = [ |
+ ":asan_runtime_bundle_data", |
+ ] |
} |
} |
} |
@@ -275,7 +253,6 @@ config("default_sanitizer_ldflags") { |
config("common_sanitizer_flags") { |
cflags = [] |
- cflags_cc = [] |
# Sanitizers need line table info for stack traces. They don't need type info |
# or variable info, so we can leave that out to speed up the build (unless |
@@ -303,11 +280,14 @@ config("common_sanitizer_flags") { |
cflags += [ "/Oy-" ] |
} |
} |
+} |
+# TODO(thomasanderson): Move this out of build/config/sanitizers. |
+config("libcxx_flags") { |
if (use_custom_libcxx) { |
prefix = "//buildtools/third_party" |
include = "trunk/include" |
- cflags_cc += [ |
+ cflags_cc = [ |
"-nostdinc++", |
"-isystem" + rebase_path("$prefix/libc++/$include", root_build_dir), |
"-isystem" + rebase_path("$prefix/libc++abi/$include", root_build_dir), |
@@ -558,6 +538,7 @@ config("fuzzing_build_mode") { |
all_sanitizer_configs = [ |
":common_sanitizer_flags", |
+ ":libcxx_flags", |
":coverage_flags", |
":default_sanitizer_ldflags", |
":asan_flags", |