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/clang/clang.gni") | 7 import("//build/config/clang/clang.gni") |
8 import("//build/config/sanitizers/sanitizers.gni") | 8 import("//build/config/sanitizers/sanitizers.gni") |
9 import("//build/toolchain/toolchain.gni") | 9 import("//build/toolchain/toolchain.gni") |
10 | 10 |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 group("deps_no_options") { | 36 group("deps_no_options") { |
37 if (using_sanitizer) { | 37 if (using_sanitizer) { |
38 public_configs = [ | 38 public_configs = [ |
39 # Even when a target removes default_sanitizer_flags, it may be depending | 39 # Even when a target removes default_sanitizer_flags, it may be depending |
40 # on a library that did not remove default_sanitizer_flags. Thus, we need | 40 # on a library that did not remove default_sanitizer_flags. Thus, we need |
41 # to add the ldflags here as well as in default_sanitizer_flags. | 41 # to add the ldflags here as well as in default_sanitizer_flags. |
42 ":default_sanitizer_ldflags", | 42 ":default_sanitizer_ldflags", |
43 ] | 43 ] |
44 deps = [] | 44 deps = [] |
| 45 public_deps = [] |
45 | 46 |
46 data = [ | 47 data = [ |
47 "//tools/valgrind/asan/", | 48 "//tools/valgrind/asan/", |
48 ] | 49 ] |
49 if (is_win) { | 50 if (is_win) { |
50 exe = ".exe" | 51 exe = ".exe" |
51 } else { | 52 } else { |
52 exe = "" | 53 exe = "" |
53 } | 54 } |
54 data += [ "$clang_base_path/bin/llvm-symbolizer${exe}" ] | 55 data += [ "$clang_base_path/bin/llvm-symbolizer${exe}" ] |
55 if (is_linux) { | 56 if (is_linux) { |
56 # llvm-symbolizer needs this. | 57 # llvm-symbolizer needs this. |
57 data += [ "$clang_base_path/lib/libstdc++.so.6" ] | 58 data += [ "$clang_base_path/lib/libstdc++.so.6" ] |
58 } | 59 } |
59 | 60 |
60 if (use_prebuilt_instrumented_libraries || | 61 if (use_prebuilt_instrumented_libraries || |
61 use_locally_built_instrumented_libraries) { | 62 use_locally_built_instrumented_libraries) { |
62 deps += [ "//third_party/instrumented_libraries:deps" ] | 63 deps += [ "//third_party/instrumented_libraries:deps" ] |
63 } | 64 } |
64 if (use_custom_libcxx) { | 65 if (use_custom_libcxx) { |
65 public_deps = [ | 66 public_deps += [ "//buildtools/third_party/libc++:libcxx_proxy" ] |
66 "//buildtools/third_party/libc++:libcxx_proxy", | |
67 ] | |
68 data += [ "$root_out_dir/libc++.so" ] | 67 data += [ "$root_out_dir/libc++.so" ] |
69 } | 68 } |
70 if (is_mac) { | 69 if (is_mac) { |
71 data_deps = [ | 70 data_deps = [ |
72 ":copy_asan_runtime", | 71 ":copy_asan_runtime", |
73 ] | 72 ] |
74 | 73 |
75 public_deps = [ | 74 public_deps += [ ":asan_runtime_bundle_data" ] |
76 ":asan_runtime_bundle_data", | |
77 ] | |
78 } | 75 } |
79 } | 76 } |
80 } | 77 } |
81 | 78 |
82 if (is_mac && using_sanitizer) { | 79 if (is_mac && using_sanitizer) { |
83 copy("copy_asan_runtime") { | 80 copy("copy_asan_runtime") { |
84 sources = [ | 81 sources = [ |
85 "$clang_base_path/lib/clang/$clang_version/lib/darwin/libclang_rt.asan_osx
_dynamic.dylib", | 82 "$clang_base_path/lib/clang/$clang_version/lib/darwin/libclang_rt.asan_osx
_dynamic.dylib", |
86 ] | 83 ] |
87 outputs = [ | 84 outputs = [ |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 # This allows to selectively disable ubsan_vptr, when needed. In particular, | 443 # This allows to selectively disable ubsan_vptr, when needed. In particular, |
447 # if some third_party code is required to be compiled without rtti, which | 444 # if some third_party code is required to be compiled without rtti, which |
448 # is a requirement for ubsan_vptr. | 445 # is a requirement for ubsan_vptr. |
449 config("default_sanitizer_flags_but_ubsan_vptr") { | 446 config("default_sanitizer_flags_but_ubsan_vptr") { |
450 configs = all_sanitizer_configs - [ ":ubsan_vptr_flags" ] | 447 configs = all_sanitizer_configs - [ ":ubsan_vptr_flags" ] |
451 } | 448 } |
452 | 449 |
453 config("default_sanitizer_flags_but_coverage") { | 450 config("default_sanitizer_flags_but_coverage") { |
454 configs = all_sanitizer_configs - [ ":coverage_flags" ] | 451 configs = all_sanitizer_configs - [ ":coverage_flags" ] |
455 } | 452 } |
OLD | NEW |