| 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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 "-fsanitize-blacklist=$cfi_blacklist_path", | 378 "-fsanitize-blacklist=$cfi_blacklist_path", |
| 379 ] | 379 ] |
| 380 | 380 |
| 381 if (use_cfi_cast) { | 381 if (use_cfi_cast) { |
| 382 cflags += [ | 382 cflags += [ |
| 383 "-fsanitize=cfi-derived-cast", | 383 "-fsanitize=cfi-derived-cast", |
| 384 "-fsanitize=cfi-unrelated-cast", | 384 "-fsanitize=cfi-unrelated-cast", |
| 385 ] | 385 ] |
| 386 } | 386 } |
| 387 | 387 |
| 388 if (use_cfi_icall) { |
| 389 cflags += [ "-fsanitize=cfi-icall" ] |
| 390 } |
| 391 |
| 388 if (use_cfi_diag) { | 392 if (use_cfi_diag) { |
| 389 cflags += [ | 393 cflags += [ |
| 390 "-fno-sanitize-trap=cfi", | 394 "-fno-sanitize-trap=cfi", |
| 391 "-fsanitize-recover=cfi", | 395 "-fsanitize-recover=cfi", |
| 392 "-fno-inline-functions", | 396 "-fno-inline-functions", |
| 393 "-fno-inline", | 397 "-fno-inline", |
| 394 "-fno-omit-frame-pointer", | 398 "-fno-omit-frame-pointer", |
| 395 "-O1", | 399 "-O1", |
| 396 ] | 400 ] |
| 397 } else { | 401 } else { |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 # This allows to selectively disable ubsan_vptr, when needed. In particular, | 579 # This allows to selectively disable ubsan_vptr, when needed. In particular, |
| 576 # if some third_party code is required to be compiled without rtti, which | 580 # if some third_party code is required to be compiled without rtti, which |
| 577 # is a requirement for ubsan_vptr. | 581 # is a requirement for ubsan_vptr. |
| 578 config("default_sanitizer_flags_but_ubsan_vptr") { | 582 config("default_sanitizer_flags_but_ubsan_vptr") { |
| 579 configs = all_sanitizer_configs - [ ":ubsan_vptr_flags" ] | 583 configs = all_sanitizer_configs - [ ":ubsan_vptr_flags" ] |
| 580 } | 584 } |
| 581 | 585 |
| 582 config("default_sanitizer_flags_but_coverage") { | 586 config("default_sanitizer_flags_but_coverage") { |
| 583 configs = all_sanitizer_configs - [ ":coverage_flags" ] | 587 configs = all_sanitizer_configs - [ ":coverage_flags" ] |
| 584 } | 588 } |
| OLD | NEW |