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") | |
6 | |
5 # Contains the dependencies needed for sanitizers to link into executables and | 7 # Contains the dependencies needed for sanitizers to link into executables and |
6 # 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 |
7 # |is_asan|, |is_lsan|, |is_tsan| and |is_msan| are false. | 9 # |is_asan|, |is_lsan|, |is_tsan| and |is_msan| are false. |
earthdok
2015/05/26 16:43:49
This comment needs to be updated.
By the way, whe
Sam McNally
2015/05/27 00:08:15
Done.
| |
8 group("deps") { | 10 group("deps") { |
9 deps = [ | 11 deps = [ |
10 "//third_party/instrumented_libraries:deps", | 12 "//third_party/instrumented_libraries:deps", |
11 ] | 13 ] |
12 if (is_asan || is_lsan || is_tsan || is_msan) { | 14 if (is_asan || is_lsan || is_tsan || is_msan) { |
13 public_configs = [ ":sanitizer_options_link_helper" ] | 15 public_configs = [ ":sanitizer_options_link_helper" ] |
14 deps += [ ":options_sources" ] | 16 deps += [ ":options_sources" ] |
15 } | 17 } |
18 if (use_custom_libcxx) { | |
19 deps += [ "//buildtools/third_party/libc++:libcxx_proxy" ] | |
20 } | |
16 } | 21 } |
17 | 22 |
18 config("sanitizer_options_link_helper") { | 23 config("sanitizer_options_link_helper") { |
19 ldflags = [ "-Wl,-u_sanitizer_options_link_helper" ] | 24 ldflags = [ "-Wl,-u_sanitizer_options_link_helper" ] |
20 if (is_asan) { | 25 if (is_asan) { |
21 ldflags += [ "-fsanitize=address" ] | 26 ldflags += [ "-fsanitize=address" ] |
22 } | 27 } |
23 if (is_lsan) { | 28 if (is_lsan) { |
24 ldflags += [ "-fsanitize=leak" ] | 29 ldflags += [ "-fsanitize=leak" ] |
25 } | 30 } |
(...skipping 19 matching lines...) Expand all Loading... | |
45 } | 50 } |
46 | 51 |
47 if (is_lsan) { | 52 if (is_lsan) { |
48 sources += [ "//build/sanitizers/lsan_suppressions.cc" ] | 53 sources += [ "//build/sanitizers/lsan_suppressions.cc" ] |
49 } | 54 } |
50 | 55 |
51 if (is_tsan) { | 56 if (is_tsan) { |
52 sources += [ "//build/sanitizers/tsan_suppressions.cc" ] | 57 sources += [ "//build/sanitizers/tsan_suppressions.cc" ] |
53 } | 58 } |
54 } | 59 } |
OLD | NEW |