1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//build/config/sanitizers/sanitizers.gni")
7 # Contains the dependencies needed for sanitizers to link into executables and
8 # shared_libraries. Unconditionally depend upon this target as it is empty if
9 # |is_asan|, |is_lsan|, |is_tsan|, |is_msan| and |use_custom_libcxx| are false.
11 if (is_asan || is_lsan || is_tsan || is_msan) {
12 public_configs = [ ":sanitizer_options_link_helper" ]
17 if (use_prebuilt_instrumented_libraries) {
18 deps += [ "//third_party/instrumented_libraries:deps" ]
20 if (use_custom_libcxx) {
21 deps += [ "//buildtools/third_party/libc++:libcxx_proxy" ]
26 config("sanitizer_options_link_helper") {
27 ldflags = [ "-Wl,-u_sanitizer_options_link_helper" ]
29 ldflags += [ "-fsanitize=address" ]
32 ldflags += [ "-fsanitize=leak" ]
35 ldflags += [ "-fsanitize=thread" ]
38 ldflags += [ "-fsanitize=memory" ]
42 source_set("options_sources") {
48 "//build/sanitizers/sanitizer_options.cc",
52 sources += [ "//build/sanitizers/asan_suppressions.cc" ]
56 sources += [ "//build/sanitizers/lsan_suppressions.cc" ]
60 sources += [ "//build/sanitizers/tsan_suppressions.cc" ]