| 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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 "-isystem" + rebase_path("$prefix/libc++/$include", root_build_dir), | 311 "-isystem" + rebase_path("$prefix/libc++/$include", root_build_dir), |
| 312 "-isystem" + rebase_path("$prefix/libc++abi/$include", root_build_dir), | 312 "-isystem" + rebase_path("$prefix/libc++abi/$include", root_build_dir), |
| 313 ] | 313 ] |
| 314 } | 314 } |
| 315 } | 315 } |
| 316 | 316 |
| 317 config("asan_flags") { | 317 config("asan_flags") { |
| 318 cflags = [] | 318 cflags = [] |
| 319 if (is_asan) { | 319 if (is_asan) { |
| 320 cflags += [ "-fsanitize=address" ] | 320 cflags += [ "-fsanitize=address" ] |
| 321 if (!is_mac && !is_win) { | 321 if (!is_mac) { |
| 322 cflags += [ "-fsanitize-address-use-after-scope" ] | 322 cflags += [ "-fsanitize-address-use-after-scope" ] |
| 323 } else if (!is_win) { | 323 } else { |
| 324 # https://crbug.com/708707 | 324 # https://crbug.com/708707 |
| 325 cflags += [ "-fno-sanitize-address-use-after-scope" ] | 325 cflags += [ "-fno-sanitize-address-use-after-scope" ] |
| 326 } | 326 } |
| 327 if (!asan_globals) { | 327 if (!asan_globals) { |
| 328 cflags += [ | 328 cflags += [ |
| 329 "-mllvm", | 329 "-mllvm", |
| 330 "-asan-globals=0", | 330 "-asan-globals=0", |
| 331 ] | 331 ] |
| 332 } | 332 } |
| 333 if (is_win) { | 333 if (is_win) { |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 588 # This allows to selectively disable ubsan_vptr, when needed. In particular, | 588 # This allows to selectively disable ubsan_vptr, when needed. In particular, |
| 589 # if some third_party code is required to be compiled without rtti, which | 589 # if some third_party code is required to be compiled without rtti, which |
| 590 # is a requirement for ubsan_vptr. | 590 # is a requirement for ubsan_vptr. |
| 591 config("default_sanitizer_flags_but_ubsan_vptr") { | 591 config("default_sanitizer_flags_but_ubsan_vptr") { |
| 592 configs = all_sanitizer_configs - [ ":ubsan_vptr_flags" ] | 592 configs = all_sanitizer_configs - [ ":ubsan_vptr_flags" ] |
| 593 } | 593 } |
| 594 | 594 |
| 595 config("default_sanitizer_flags_but_coverage") { | 595 config("default_sanitizer_flags_but_coverage") { |
| 596 configs = all_sanitizer_configs - [ ":coverage_flags" ] | 596 configs = all_sanitizer_configs - [ ":coverage_flags" ] |
| 597 } | 597 } |
| OLD | NEW |