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_overrides/build.gni") | 5 import("//build_overrides/build.gni") |
6 import("//build/config/chrome_build.gni") | 6 import("//build/config/chrome_build.gni") |
7 import("//build/config/chromecast_build.gni") | 7 import("//build/config/chromecast_build.gni") |
8 import("//build/config/clang/clang.gni") | 8 import("//build/config/clang/clang.gni") |
9 import("//build/config/sanitizers/sanitizers.gni") | 9 import("//build/config/sanitizers/sanitizers.gni") |
10 import("//build/toolchain/toolchain.gni") | 10 import("//build/toolchain/toolchain.gni") |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 ] | 310 ] |
311 } | 311 } |
312 } | 312 } |
313 | 313 |
314 config("asan_flags") { | 314 config("asan_flags") { |
315 cflags = [] | 315 cflags = [] |
316 if (is_asan) { | 316 if (is_asan) { |
317 cflags += [ "-fsanitize=address" ] | 317 cflags += [ "-fsanitize=address" ] |
318 if (!is_mac && !is_win) { | 318 if (!is_mac && !is_win) { |
319 cflags += [ "-fsanitize-address-use-after-scope" ] | 319 cflags += [ "-fsanitize-address-use-after-scope" ] |
320 } else { | 320 } else if (!is_win) { |
321 # https://crbug.com/708707 | 321 # https://crbug.com/708707 |
322 cflags += [ "-fno-sanitize-address-use-after-scope" ] | 322 cflags += [ "-fno-sanitize-address-use-after-scope" ] |
323 } | 323 } |
324 if (!asan_globals) { | 324 if (!asan_globals) { |
325 cflags += [ | 325 cflags += [ |
326 "-mllvm", | 326 "-mllvm", |
327 "-asan-globals=0", | 327 "-asan-globals=0", |
328 ] | 328 ] |
329 } | 329 } |
330 if (is_win) { | 330 if (is_win) { |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 # This allows to selectively disable ubsan_vptr, when needed. In particular, | 585 # This allows to selectively disable ubsan_vptr, when needed. In particular, |
586 # if some third_party code is required to be compiled without rtti, which | 586 # if some third_party code is required to be compiled without rtti, which |
587 # is a requirement for ubsan_vptr. | 587 # is a requirement for ubsan_vptr. |
588 config("default_sanitizer_flags_but_ubsan_vptr") { | 588 config("default_sanitizer_flags_but_ubsan_vptr") { |
589 configs = all_sanitizer_configs - [ ":ubsan_vptr_flags" ] | 589 configs = all_sanitizer_configs - [ ":ubsan_vptr_flags" ] |
590 } | 590 } |
591 | 591 |
592 config("default_sanitizer_flags_but_coverage") { | 592 config("default_sanitizer_flags_but_coverage") { |
593 configs = all_sanitizer_configs - [ ":coverage_flags" ] | 593 configs = all_sanitizer_configs - [ ":coverage_flags" ] |
594 } | 594 } |
OLD | NEW |