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/sanitizers/sanitizers.gni") | 8 import("//build/config/sanitizers/sanitizers.gni") |
8 import("//build/toolchain/toolchain.gni") | 9 import("//build/toolchain/toolchain.gni") |
9 | 10 |
10 # Contains the dependencies needed for sanitizers to link into executables and | 11 # Contains the dependencies needed for sanitizers to link into executables and |
11 # shared_libraries. Unconditionally depend upon this target as it is empty if | 12 # 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. | 13 # |is_asan|, |is_lsan|, |is_tsan|, |is_msan| and |use_custom_libcxx| are false. |
13 group("deps") { | 14 group("deps") { |
14 public_deps = [ | 15 public_deps = [ |
15 ":deps_no_options", | 16 ":deps_no_options", |
16 ] | 17 ] |
(...skipping 26 matching lines...) Expand all Loading... |
43 deps = [] | 44 deps = [] |
44 | 45 |
45 data = [ | 46 data = [ |
46 "//tools/valgrind/asan/", | 47 "//tools/valgrind/asan/", |
47 ] | 48 ] |
48 if (is_win) { | 49 if (is_win) { |
49 exe = ".exe" | 50 exe = ".exe" |
50 } else { | 51 } else { |
51 exe = "" | 52 exe = "" |
52 } | 53 } |
53 data += [ "//third_party//llvm-build/Release+Asserts/bin/llvm-symbolizer${ex
e}" ] | 54 data += [ "$clang_base_path/bin/llvm-symbolizer${exe}" ] |
54 if (is_linux) { | 55 if (is_linux) { |
55 # llvm-symbolizer needs this. | 56 # llvm-symbolizer needs this. |
56 data += [ "//third_party/llvm-build/Release+Asserts/lib/libstdc++.so.6" ] | 57 data += [ "$clang_base_path/lib/libstdc++.so.6" ] |
57 } | 58 } |
58 | 59 |
59 if (use_prebuilt_instrumented_libraries) { | 60 if (use_prebuilt_instrumented_libraries) { |
60 deps += [ "//third_party/instrumented_libraries:deps" ] | 61 deps += [ "//third_party/instrumented_libraries:deps" ] |
61 } | 62 } |
62 if (use_custom_libcxx) { | 63 if (use_custom_libcxx) { |
63 public_deps = [ | 64 public_deps = [ |
64 "//buildtools/third_party/libc++:libcxx_proxy", | 65 "//buildtools/third_party/libc++:libcxx_proxy", |
65 ] | 66 ] |
66 data += [ "$root_out_dir/libc++.so" ] | 67 data += [ "$root_out_dir/libc++.so" ] |
67 } | 68 } |
68 if (is_mac) { | 69 if (is_mac) { |
69 data_deps = [ | 70 data_deps = [ |
70 ":copy_asan_runtime", | 71 ":copy_asan_runtime", |
71 ] | 72 ] |
72 } | 73 } |
73 } | 74 } |
74 } | 75 } |
75 | 76 |
76 if (is_mac && using_sanitizer) { | 77 if (is_mac && using_sanitizer) { |
77 copy("copy_asan_runtime") { | 78 copy("copy_asan_runtime") { |
78 sources = [ | 79 sources = [ |
79 "//third_party/llvm-build/Release+Asserts/lib/clang/$clang_version/lib/dar
win/libclang_rt.asan_osx_dynamic.dylib", | 80 "$clang_base_path/lib/clang/$clang_version/lib/darwin/libclang_rt.asan_osx
_dynamic.dylib", |
80 ] | 81 ] |
81 outputs = [ | 82 outputs = [ |
82 "$root_out_dir/{{source_file_part}}", | 83 "$root_out_dir/{{source_file_part}}", |
83 ] | 84 ] |
84 } | 85 } |
85 } | 86 } |
86 | 87 |
87 config("sanitizer_options_link_helper") { | 88 config("sanitizer_options_link_helper") { |
88 if (is_mac) { | 89 if (is_mac) { |
89 ldflags = [ "-Wl,-U,_sanitizer_options_link_helper" ] | 90 ldflags = [ "-Wl,-U,_sanitizer_options_link_helper" ] |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 # This allows to selectively disable ubsan_vptr, when needed. In particular, | 433 # This allows to selectively disable ubsan_vptr, when needed. In particular, |
433 # if some third_party code is required to be compiled without rtti, which | 434 # if some third_party code is required to be compiled without rtti, which |
434 # is a requirement for ubsan_vptr. | 435 # is a requirement for ubsan_vptr. |
435 config("default_sanitizer_flags_but_ubsan_vptr") { | 436 config("default_sanitizer_flags_but_ubsan_vptr") { |
436 configs = all_sanitizer_configs - [ ":ubsan_vptr_flags" ] | 437 configs = all_sanitizer_configs - [ ":ubsan_vptr_flags" ] |
437 } | 438 } |
438 | 439 |
439 config("default_sanitizer_flags_but_coverage") { | 440 config("default_sanitizer_flags_but_coverage") { |
440 configs = all_sanitizer_configs - [ ":coverage_flags" ] | 441 configs = all_sanitizer_configs - [ ":coverage_flags" ] |
441 } | 442 } |
OLD | NEW |