| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/config/sanitizers/sanitizers.gni") | 5 import("//build/config/sanitizers/sanitizers.gni") |
| 6 | 6 |
| 7 # Contains the dependencies needed for sanitizers to link into executables and | 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 | 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. | 9 # |is_asan|, |is_lsan|, |is_tsan|, |is_msan| and |use_custom_libcxx| are false. |
| 10 group("deps") { | 10 group("deps") { |
| 11 deps = [ | |
| 12 "//third_party/instrumented_libraries:deps", | |
| 13 ] | |
| 14 if (is_asan || is_lsan || is_tsan || is_msan) { | 11 if (is_asan || is_lsan || is_tsan || is_msan) { |
| 15 public_configs = [ ":sanitizer_options_link_helper" ] | 12 public_configs = [ ":sanitizer_options_link_helper" ] |
| 16 deps += [ ":options_sources" ] | 13 deps = [ |
| 17 } | 14 ":options_sources", |
| 18 if (use_custom_libcxx) { | 15 ] |
| 19 deps += [ "//buildtools/third_party/libc++:libcxx_proxy" ] | 16 |
| 17 if (use_prebuilt_instrumented_libraries) { |
| 18 deps += [ "//third_party/instrumented_libraries:deps" ] |
| 19 } |
| 20 if (use_custom_libcxx) { |
| 21 deps += [ "//buildtools/third_party/libc++:libcxx_proxy" ] |
| 22 } |
| 20 } | 23 } |
| 21 } | 24 } |
| 22 | 25 |
| 23 config("sanitizer_options_link_helper") { | 26 config("sanitizer_options_link_helper") { |
| 24 ldflags = [ "-Wl,-u_sanitizer_options_link_helper" ] | 27 ldflags = [ "-Wl,-u_sanitizer_options_link_helper" ] |
| 25 if (is_asan) { | 28 if (is_asan) { |
| 26 ldflags += [ "-fsanitize=address" ] | 29 ldflags += [ "-fsanitize=address" ] |
| 27 } | 30 } |
| 28 if (is_lsan) { | 31 if (is_lsan) { |
| 29 ldflags += [ "-fsanitize=leak" ] | 32 ldflags += [ "-fsanitize=leak" ] |
| (...skipping 20 matching lines...) Expand all Loading... |
| 50 } | 53 } |
| 51 | 54 |
| 52 if (is_lsan) { | 55 if (is_lsan) { |
| 53 sources += [ "//build/sanitizers/lsan_suppressions.cc" ] | 56 sources += [ "//build/sanitizers/lsan_suppressions.cc" ] |
| 54 } | 57 } |
| 55 | 58 |
| 56 if (is_tsan) { | 59 if (is_tsan) { |
| 57 sources += [ "//build/sanitizers/tsan_suppressions.cc" ] | 60 sources += [ "//build/sanitizers/tsan_suppressions.cc" ] |
| 58 } | 61 } |
| 59 } | 62 } |
| OLD | NEW |