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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
59 } | 59 } |
60 | 60 |
61 if (use_prebuilt_instrumented_libraries || | 61 if (use_prebuilt_instrumented_libraries || |
62 use_locally_built_instrumented_libraries) { | 62 use_locally_built_instrumented_libraries) { |
63 deps += [ "//third_party/instrumented_libraries:deps" ] | 63 deps += [ "//third_party/instrumented_libraries:deps" ] |
64 } | 64 } |
65 if (use_custom_libcxx) { | 65 if (use_custom_libcxx) { |
66 public_deps += [ "//buildtools/third_party/libc++:libcxx_proxy" ] | 66 public_deps += [ "//buildtools/third_party/libc++:libcxx_proxy" ] |
67 data += [ "$root_out_dir/libc++.so" ] | 67 data += [ "$root_out_dir/libc++.so" ] |
68 } | 68 } |
69 if (is_mac) { | 69 if (is_mac || is_win) { |
70 data_deps = [ | 70 data_deps = [ |
71 ":copy_asan_runtime", | 71 ":copy_asan_runtime", |
72 ] | 72 ] |
73 | 73 |
74 public_deps += [ ":asan_runtime_bundle_data" ] | 74 public_deps += [ ":asan_runtime_bundle_data" ] |
75 } | 75 } |
76 } | 76 } |
77 } | 77 } |
78 | 78 |
79 if (is_mac && using_sanitizer) { | 79 if ((is_mac || is_win) && using_sanitizer) { |
Dirk Pranke
2016/08/03 00:06:10
This isn't quite right, because now bundle_data("a
| |
80 copy("copy_asan_runtime") { | 80 copy("copy_asan_runtime") { |
81 if (is_mac) { | |
82 clang_rt_dso_path = "darwin/libclang_rt.asan_osx_dynamic.dylib" | |
83 } else if (is_win && target_cpu == "x86") { | |
84 clang_rt_dso_path = "windows/clang_rt.asan_dynamic-i386.dll" | |
85 } else if (is_win && target_cpu == "x64") { | |
86 clang_rt_dso_path = "windows/clang_rt.asan_dynamic-x86_64.dll" | |
Nico
2016/08/02 22:00:49
Is this enough? atm asan is enabled for not just t
Reid Kleckner
2016/08/02 22:13:16
I only know it's enough to make base_unittests and
| |
87 } | |
81 sources = [ | 88 sources = [ |
82 "$clang_base_path/lib/clang/$clang_version/lib/darwin/libclang_rt.asan_osx _dynamic.dylib", | 89 "$clang_base_path/lib/clang/$clang_version/lib/$clang_rt_dso_path", |
83 ] | 90 ] |
84 outputs = [ | 91 outputs = [ |
85 "$root_out_dir/{{source_file_part}}", | 92 "$root_out_dir/{{source_file_part}}", |
86 ] | 93 ] |
87 } | 94 } |
88 | 95 |
89 bundle_data("asan_runtime_bundle_data") { | 96 bundle_data("asan_runtime_bundle_data") { |
90 sources = get_target_outputs(":copy_asan_runtime") | 97 sources = get_target_outputs(":copy_asan_runtime") |
91 outputs = [ | 98 outputs = [ |
92 "{{bundle_executable_dir}}/{{source_file_part}}", | 99 "{{bundle_executable_dir}}/{{source_file_part}}", |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
457 # This allows to selectively disable ubsan_vptr, when needed. In particular, | 464 # This allows to selectively disable ubsan_vptr, when needed. In particular, |
458 # if some third_party code is required to be compiled without rtti, which | 465 # if some third_party code is required to be compiled without rtti, which |
459 # is a requirement for ubsan_vptr. | 466 # is a requirement for ubsan_vptr. |
460 config("default_sanitizer_flags_but_ubsan_vptr") { | 467 config("default_sanitizer_flags_but_ubsan_vptr") { |
461 configs = all_sanitizer_configs - [ ":ubsan_vptr_flags" ] | 468 configs = all_sanitizer_configs - [ ":ubsan_vptr_flags" ] |
462 } | 469 } |
463 | 470 |
464 config("default_sanitizer_flags_but_coverage") { | 471 config("default_sanitizer_flags_but_coverage") { |
465 configs = all_sanitizer_configs - [ ":coverage_flags" ] | 472 configs = all_sanitizer_configs - [ ":coverage_flags" ] |
466 } | 473 } |
OLD | NEW |