| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 if (use_custom_libcxx) { | 64 if (use_custom_libcxx) { |
| 65 public_deps = [ | 65 public_deps = [ |
| 66 "//buildtools/third_party/libc++:libcxx_proxy", | 66 "//buildtools/third_party/libc++:libcxx_proxy", |
| 67 ] | 67 ] |
| 68 data += [ "$root_out_dir/libc++.so" ] | 68 data += [ "$root_out_dir/libc++.so" ] |
| 69 } | 69 } |
| 70 if (is_mac) { | 70 if (is_mac) { |
| 71 data_deps = [ | 71 data_deps = [ |
| 72 ":copy_asan_runtime", | 72 ":copy_asan_runtime", |
| 73 ] | 73 ] |
| 74 |
| 75 public_deps = [ |
| 76 ":asan_runtime_bundle_data", |
| 77 ] |
| 74 } | 78 } |
| 75 } | 79 } |
| 76 } | 80 } |
| 77 | 81 |
| 78 if (is_mac && using_sanitizer) { | 82 if (is_mac && using_sanitizer) { |
| 79 copy("copy_asan_runtime") { | 83 copy("copy_asan_runtime") { |
| 80 sources = [ | 84 sources = [ |
| 81 "$clang_base_path/lib/clang/$clang_version/lib/darwin/libclang_rt.asan_osx
_dynamic.dylib", | 85 "$clang_base_path/lib/clang/$clang_version/lib/darwin/libclang_rt.asan_osx
_dynamic.dylib", |
| 82 ] | 86 ] |
| 83 outputs = [ | 87 outputs = [ |
| 84 "$root_out_dir/{{source_file_part}}", | 88 "$root_out_dir/{{source_file_part}}", |
| 85 ] | 89 ] |
| 86 } | 90 } |
| 91 |
| 92 bundle_data("asan_runtime_bundle_data") { |
| 93 sources = get_target_outputs(":copy_asan_runtime") |
| 94 outputs = [ |
| 95 "{{bundle_executable_dir}}/{{source_file_part}}", |
| 96 ] |
| 97 public_deps = [ |
| 98 ":copy_asan_runtime", |
| 99 ] |
| 100 } |
| 87 } | 101 } |
| 88 | 102 |
| 89 config("sanitizer_options_link_helper") { | 103 config("sanitizer_options_link_helper") { |
| 90 if (is_mac) { | 104 if (is_mac) { |
| 91 ldflags = [ "-Wl,-U,_sanitizer_options_link_helper" ] | 105 ldflags = [ "-Wl,-U,_sanitizer_options_link_helper" ] |
| 92 } else if (!is_win) { | 106 } else if (!is_win) { |
| 93 ldflags = [ "-Wl,-u_sanitizer_options_link_helper" ] | 107 ldflags = [ "-Wl,-u_sanitizer_options_link_helper" ] |
| 94 } | 108 } |
| 95 } | 109 } |
| 96 | 110 |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 # This allows to selectively disable ubsan_vptr, when needed. In particular, | 446 # 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 | 447 # if some third_party code is required to be compiled without rtti, which |
| 434 # is a requirement for ubsan_vptr. | 448 # is a requirement for ubsan_vptr. |
| 435 config("default_sanitizer_flags_but_ubsan_vptr") { | 449 config("default_sanitizer_flags_but_ubsan_vptr") { |
| 436 configs = all_sanitizer_configs - [ ":ubsan_vptr_flags" ] | 450 configs = all_sanitizer_configs - [ ":ubsan_vptr_flags" ] |
| 437 } | 451 } |
| 438 | 452 |
| 439 config("default_sanitizer_flags_but_coverage") { | 453 config("default_sanitizer_flags_but_coverage") { |
| 440 configs = all_sanitizer_configs - [ ":coverage_flags" ] | 454 configs = all_sanitizer_configs - [ ":coverage_flags" ] |
| 441 } | 455 } |
| OLD | NEW |