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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 if (is_ubsan_no_recover) { | 473 if (is_ubsan_no_recover) { |
474 cflags = [ "-fno-sanitize-recover=undefined" ] | 474 cflags = [ "-fno-sanitize-recover=undefined" ] |
475 } | 475 } |
476 } | 476 } |
477 | 477 |
478 config("ubsan_security_flags") { | 478 config("ubsan_security_flags") { |
479 if (is_ubsan_security) { | 479 if (is_ubsan_security) { |
480 ubsan_security_blacklist_path = | 480 ubsan_security_blacklist_path = |
481 rebase_path("//tools/ubsan/security_blacklist.txt", root_build_dir) | 481 rebase_path("//tools/ubsan/security_blacklist.txt", root_build_dir) |
482 cflags = [ | 482 cflags = [ |
483 "-fsanitize=signed-integer-overflow,shift,vptr", | 483 "-fsanitize=signed-integer-overflow,shift,vptr,function,object-size,vla-bo
und", |
484 "-fsanitize-blacklist=$ubsan_security_blacklist_path", | 484 "-fsanitize-blacklist=$ubsan_security_blacklist_path", |
485 ] | 485 ] |
486 } | 486 } |
487 } | 487 } |
488 | 488 |
489 config("ubsan_null_flags") { | 489 config("ubsan_null_flags") { |
490 if (is_ubsan_null) { | 490 if (is_ubsan_null) { |
491 cflags = [ "-fsanitize=null" ] | 491 cflags = [ "-fsanitize=null" ] |
492 } | 492 } |
493 } | 493 } |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 # This allows to selectively disable ubsan_vptr, when needed. In particular, | 535 # This allows to selectively disable ubsan_vptr, when needed. In particular, |
536 # if some third_party code is required to be compiled without rtti, which | 536 # if some third_party code is required to be compiled without rtti, which |
537 # is a requirement for ubsan_vptr. | 537 # is a requirement for ubsan_vptr. |
538 config("default_sanitizer_flags_but_ubsan_vptr") { | 538 config("default_sanitizer_flags_but_ubsan_vptr") { |
539 configs = all_sanitizer_configs - [ ":ubsan_vptr_flags" ] | 539 configs = all_sanitizer_configs - [ ":ubsan_vptr_flags" ] |
540 } | 540 } |
541 | 541 |
542 config("default_sanitizer_flags_but_coverage") { | 542 config("default_sanitizer_flags_but_coverage") { |
543 configs = all_sanitizer_configs - [ ":coverage_flags" ] | 543 configs = all_sanitizer_configs - [ ":coverage_flags" ] |
544 } | 544 } |
OLD | NEW |