Chromium Code Reviews| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 73 ] | 73 ] | 
| 74 | 74 | 
| 75 public_deps = [ | 75 public_deps = [ | 
| 76 ":asan_runtime_bundle_data", | 76 ":asan_runtime_bundle_data", | 
| 77 ] | 77 ] | 
| 78 } | 78 } | 
| 79 } | 79 } | 
| 80 } | 80 } | 
| 81 | 81 | 
| 82 if (is_mac && using_sanitizer) { | 82 if (is_mac && using_sanitizer) { | 
| 83 copy("copy_asan_runtime") { | 83 copy("copy_asan_runtime") { | 
| 
 
Dirk Pranke
2016/07/30 00:57:38
I think you need to make this rule work as well on
 
 | |
| 84 sources = [ | 84 sources = [ | 
| 85 "$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", | 
| 86 ] | 86 ] | 
| 87 outputs = [ | 87 outputs = [ | 
| 88 "$root_out_dir/{{source_file_part}}", | 88 "$root_out_dir/{{source_file_part}}", | 
| 89 ] | 89 ] | 
| 90 } | 90 } | 
| 91 | 91 | 
| 92 bundle_data("asan_runtime_bundle_data") { | 92 bundle_data("asan_runtime_bundle_data") { | 
| 93 sources = get_target_outputs(":copy_asan_runtime") | 93 sources = get_target_outputs(":copy_asan_runtime") | 
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 234 rebase_path("//tools/memory/asan/blacklist_win.txt", | 234 rebase_path("//tools/memory/asan/blacklist_win.txt", | 
| 235 root_build_dir) ] | 235 root_build_dir) ] | 
| 236 } else { | 236 } else { | 
| 237 # TODO(rnk): Remove this as discussed in http://crbug.com/427202. | 237 # TODO(rnk): Remove this as discussed in http://crbug.com/427202. | 
| 238 cflags += | 238 cflags += | 
| 239 [ "-fsanitize-blacklist=" + | 239 [ "-fsanitize-blacklist=" + | 
| 240 rebase_path("//tools/memory/asan/blacklist.txt", root_build_dir) ] | 240 rebase_path("//tools/memory/asan/blacklist.txt", root_build_dir) ] | 
| 241 } | 241 } | 
| 242 | 242 | 
| 243 if (is_win) { | 243 if (is_win) { | 
| 244 assert(current_cpu == "x86", "WinASan is 32-bit only currently") | 244 if (target_cpu == "x64") { | 
| 245 if (is_component_build) { | 245 # Windows 64-bit. | 
| 246 libs = [ | 246 if (is_component_build) { | 
| 247 "clang_rt.asan_dynamic-i386.lib", | 247 libs = [ | 
| 248 "clang_rt.asan_dynamic_runtime_thunk-i386.lib", | 248 "clang_rt.asan_dynamic-x86_64.lib", | 
| 249 ] | 249 "clang_rt.asan_dynamic_runtime_thunk-x86_64.lib", | 
| 250 ] | |
| 251 } else { | |
| 252 # TODO(etienneb): DLLs in the non-component build should link against | |
| 253 # clang_rt.asan_dll_thunk-x86_64.lib instead. | |
| 254 libs = [ "clang_rt.asan-x86_64.lib" ] | |
| 255 } | |
| 250 } else { | 256 } else { | 
| 251 # TODO(rnk): DLLs in the non-component build should link against | 257 assert(target_cpu == "x86", "WinASan unsupported architecture") | 
| 252 # clang_rt.asan_dll_thunk-i386.lib instead. | 258 if (is_component_build) { | 
| 253 libs = [ "clang_rt.asan-i386.lib" ] | 259 libs = [ | 
| 260 "clang_rt.asan_dynamic-i386.lib", | |
| 261 "clang_rt.asan_dynamic_runtime_thunk-i386.lib", | |
| 262 ] | |
| 263 } else { | |
| 264 # TODO(etienneb): DLLs in the non-component build should link against | |
| 265 # clang_rt.asan_dll_thunk-i386.lib instead. | |
| 266 libs = [ "clang_rt.asan-i386.lib" ] | |
| 
 
Dirk Pranke
2016/07/30 00:57:38
why not just change this to clang_rt.asan_dll_thun
 
 | |
| 267 } | |
| 254 } | 268 } | 
| 255 } | 269 } | 
| 256 } | 270 } | 
| 257 } | 271 } | 
| 258 | 272 | 
| 259 config("cfi_flags") { | 273 config("cfi_flags") { | 
| 260 cflags = [] | 274 cflags = [] | 
| 261 if (is_cfi && !is_nacl) { | 275 if (is_cfi && !is_nacl) { | 
| 262 cfi_blacklist_path = | 276 cfi_blacklist_path = | 
| 263 rebase_path("//tools/cfi/blacklist.txt", root_build_dir) | 277 rebase_path("//tools/cfi/blacklist.txt", root_build_dir) | 
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 446 # This allows to selectively disable ubsan_vptr, when needed. In particular, | 460 # 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 | 461 # if some third_party code is required to be compiled without rtti, which | 
| 448 # is a requirement for ubsan_vptr. | 462 # is a requirement for ubsan_vptr. | 
| 449 config("default_sanitizer_flags_but_ubsan_vptr") { | 463 config("default_sanitizer_flags_but_ubsan_vptr") { | 
| 450 configs = all_sanitizer_configs - [ ":ubsan_vptr_flags" ] | 464 configs = all_sanitizer_configs - [ ":ubsan_vptr_flags" ] | 
| 451 } | 465 } | 
| 452 | 466 | 
| 453 config("default_sanitizer_flags_but_coverage") { | 467 config("default_sanitizer_flags_but_coverage") { | 
| 454 configs = all_sanitizer_configs - [ ":coverage_flags" ] | 468 configs = all_sanitizer_configs - [ ":coverage_flags" ] | 
| 455 } | 469 } | 
| OLD | NEW |