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/chrome_build.gni") | 5 import("//build/config/chrome_build.gni") |
6 import("//build/config/chromecast_build.gni") | 6 import("//build/config/chromecast_build.gni") |
7 import("//build/config/sanitizers/sanitizers.gni") | 7 import("//build/config/sanitizers/sanitizers.gni") |
8 import("//build/toolchain/toolchain.gni") | 8 import("//build/toolchain/toolchain.gni") |
9 | 9 |
10 # Contains the dependencies needed for sanitizers to link into executables and | 10 # Contains the dependencies needed for sanitizers to link into executables and |
11 # shared_libraries. Unconditionally depend upon this target as it is empty if | 11 # shared_libraries. Unconditionally depend upon this target as it is empty if |
12 # |is_asan|, |is_lsan|, |is_tsan|, |is_msan| and |use_custom_libcxx| are false. | 12 # |is_asan|, |is_lsan|, |is_tsan|, |is_msan| and |use_custom_libcxx| are false. |
13 group("deps") { | 13 group("deps") { |
14 deps = [ | 14 public_deps = [ |
15 ":deps_no_options", | 15 ":deps_no_options", |
16 ] | 16 ] |
17 if (using_sanitizer) { | 17 if (using_sanitizer) { |
18 public_configs = [ | 18 public_configs = [ |
19 ":sanitizer_options_link_helper", | 19 ":sanitizer_options_link_helper", |
20 | 20 |
21 # Even when a target removes default_sanitizer_flags, it may be depending | 21 # Even when a target removes default_sanitizer_flags, it may be depending |
22 # on a library that did not remove default_sanitizer_flags. Thus, we need | 22 # on a library that did not remove default_sanitizer_flags. Thus, we need |
23 # to add the ldflags here as well as in default_sanitizer_flags. | 23 # to add the ldflags here as well as in default_sanitizer_flags. |
24 ":default_sanitizer_ldflags", | 24 ":default_sanitizer_ldflags", |
25 ] | 25 ] |
26 deps += [ ":options_sources" ] | 26 deps = [ |
| 27 ":options_sources", |
| 28 ] |
27 } | 29 } |
28 } | 30 } |
29 | 31 |
30 group("deps_no_options") { | 32 group("deps_no_options") { |
31 if (using_sanitizer) { | 33 if (using_sanitizer) { |
32 public_configs = [ | 34 public_configs = [ |
33 # Even when a target removes default_sanitizer_flags, it may be depending | 35 # Even when a target removes default_sanitizer_flags, it may be depending |
34 # on a library that did not remove default_sanitizer_flags. Thus, we need | 36 # on a library that did not remove default_sanitizer_flags. Thus, we need |
35 # to add the ldflags here as well as in default_sanitizer_flags. | 37 # to add the ldflags here as well as in default_sanitizer_flags. |
36 ":default_sanitizer_ldflags", | 38 ":default_sanitizer_ldflags", |
37 ] | 39 ] |
38 deps = [] | 40 deps = [] |
39 if (use_prebuilt_instrumented_libraries) { | 41 if (use_prebuilt_instrumented_libraries) { |
40 deps += [ "//third_party/instrumented_libraries:deps" ] | 42 deps += [ "//third_party/instrumented_libraries:deps" ] |
41 } | 43 } |
42 if (use_custom_libcxx) { | 44 if (use_custom_libcxx) { |
43 deps += [ "//buildtools/third_party/libc++:libcxx_proxy" ] | 45 public_deps = [ |
| 46 "//buildtools/third_party/libc++:libcxx_proxy", |
| 47 ] |
44 } | 48 } |
45 if (is_mac) { | 49 if (is_mac) { |
46 data_deps = [ | 50 data_deps = [ |
47 ":copy_asan_runtime", | 51 ":copy_asan_runtime", |
48 ] | 52 ] |
49 } | 53 } |
50 } | 54 } |
51 } | 55 } |
52 | 56 |
53 if (is_mac) { | 57 if (is_mac) { |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 # This allows to selectively disable ubsan_vptr, when needed. In particular, | 403 # This allows to selectively disable ubsan_vptr, when needed. In particular, |
400 # if some third_party code is required to be compiled without rtti, which | 404 # if some third_party code is required to be compiled without rtti, which |
401 # is a requirement for ubsan_vptr. | 405 # is a requirement for ubsan_vptr. |
402 config("default_sanitizer_flags_but_ubsan_vptr") { | 406 config("default_sanitizer_flags_but_ubsan_vptr") { |
403 configs = all_sanitizer_configs - [ ":ubsan_vptr_flags" ] | 407 configs = all_sanitizer_configs - [ ":ubsan_vptr_flags" ] |
404 } | 408 } |
405 | 409 |
406 config("default_sanitizer_flags_but_coverage") { | 410 config("default_sanitizer_flags_but_coverage") { |
407 configs = all_sanitizer_configs - [ ":coverage_flags" ] | 411 configs = all_sanitizer_configs - [ ":coverage_flags" ] |
408 } | 412 } |
OLD | NEW |