| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 if (use_prebuilt_instrumented_libraries || | 60 if (use_prebuilt_instrumented_libraries || |
| 61 use_locally_built_instrumented_libraries) { | 61 use_locally_built_instrumented_libraries) { |
| 62 deps += [ "//third_party/instrumented_libraries:deps" ] | 62 deps += [ "//third_party/instrumented_libraries:deps" ] |
| 63 } | 63 } |
| 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 |
| 70 if (is_mac) { | 71 if (is_mac) { |
| 71 data_deps = [ | 72 data_deps = [ |
| 72 ":copy_asan_runtime", | 73 ":copy_asan_runtime", |
| 73 ] | 74 ] |
| 74 } | 75 } |
| 75 } | 76 } |
| 76 } | 77 } |
| 77 | 78 |
| 78 if (is_mac && using_sanitizer) { | 79 if (is_mac && using_sanitizer) { |
| 79 copy("copy_asan_runtime") { | 80 action("copy_asan_runtime") { |
| 81 script = "//build/config/sanitizers/copy_asan_runtime_mac.py" |
| 82 _basename = "libclang_rt.asan_osx_dynamic.dylib" |
| 80 sources = [ | 83 sources = [ |
| 81 "$clang_base_path/lib/clang/$clang_version/lib/darwin/libclang_rt.asan_osx
_dynamic.dylib", | 84 "$clang_base_path/lib/clang/$clang_version/lib/darwin/$_basename", |
| 82 ] | 85 ] |
| 83 outputs = [ | 86 outputs = [ |
| 84 "$root_out_dir/{{source_file_part}}", | 87 "$root_build_dir/$_basename", |
| 85 ] | 88 ] |
| 89 args = rebase_path(sources, root_build_dir) + |
| 90 rebase_path(outputs, root_build_dir) |
| 86 } | 91 } |
| 87 } | 92 } |
| 88 | 93 |
| 89 config("sanitizer_options_link_helper") { | 94 config("sanitizer_options_link_helper") { |
| 90 if (is_mac) { | 95 if (is_mac) { |
| 91 ldflags = [ "-Wl,-U,_sanitizer_options_link_helper" ] | 96 ldflags = [ "-Wl,-U,_sanitizer_options_link_helper" ] |
| 92 } else if (!is_win) { | 97 } else if (!is_win) { |
| 93 ldflags = [ "-Wl,-u_sanitizer_options_link_helper" ] | 98 ldflags = [ "-Wl,-u_sanitizer_options_link_helper" ] |
| 94 } | 99 } |
| 95 } | 100 } |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 # This allows to selectively disable ubsan_vptr, when needed. In particular, | 437 # 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 | 438 # if some third_party code is required to be compiled without rtti, which |
| 434 # is a requirement for ubsan_vptr. | 439 # is a requirement for ubsan_vptr. |
| 435 config("default_sanitizer_flags_but_ubsan_vptr") { | 440 config("default_sanitizer_flags_but_ubsan_vptr") { |
| 436 configs = all_sanitizer_configs - [ ":ubsan_vptr_flags" ] | 441 configs = all_sanitizer_configs - [ ":ubsan_vptr_flags" ] |
| 437 } | 442 } |
| 438 | 443 |
| 439 config("default_sanitizer_flags_but_coverage") { | 444 config("default_sanitizer_flags_but_coverage") { |
| 440 configs = all_sanitizer_configs - [ ":coverage_flags" ] | 445 configs = all_sanitizer_configs - [ ":coverage_flags" ] |
| 441 } | 446 } |
| OLD | NEW |