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/sanitizers/sanitizers.gni") | 7 import("//build/config/sanitizers/sanitizers.gni") |
8 import("//build/toolchain/toolchain.gni") | 8 import("//build/toolchain/toolchain.gni") |
9 | 9 |
10 # Contains the dependencies needed for sanitizers to link into executables and | 10 # Contains the dependencies needed for sanitizers to link into executables and |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 } | 345 } |
346 | 346 |
347 config("ubsan_no_recover") { | 347 config("ubsan_no_recover") { |
348 if (is_ubsan_no_recover) { | 348 if (is_ubsan_no_recover) { |
349 cflags = [ "-fno-sanitize-recover=undefined" ] | 349 cflags = [ "-fno-sanitize-recover=undefined" ] |
350 } | 350 } |
351 } | 351 } |
352 | 352 |
353 config("ubsan_security_flags") { | 353 config("ubsan_security_flags") { |
354 if (is_ubsan_security) { | 354 if (is_ubsan_security) { |
355 ubsan_blacklist_path = | 355 ubsan_security_blacklist_path = |
356 rebase_path("//tools/ubsan/blacklist.txt", root_build_dir) | 356 rebase_path("//tools/ubsan/security_blacklist.txt", root_build_dir) |
357 cflags = [ | 357 cflags = [ |
358 "-fsanitize=signed-integer-overflow,shift", | 358 "-fsanitize=signed-integer-overflow,shift,vptr", |
359 "-fsanitize-blacklist=$ubsan_blacklist_path", | 359 "-fsanitize-blacklist=$ubsan_security_blacklist_path", |
360 ] | 360 ] |
361 } | 361 } |
362 } | 362 } |
363 | 363 |
364 config("ubsan_vptr_flags") { | 364 config("ubsan_vptr_flags") { |
365 if (is_ubsan_vptr) { | 365 if (is_ubsan_vptr) { |
366 ubsan_vptr_blacklist_path = | 366 ubsan_vptr_blacklist_path = |
367 rebase_path("//tools/ubsan/vptr_blacklist.txt", root_build_dir) | 367 rebase_path("//tools/ubsan/vptr_blacklist.txt", root_build_dir) |
368 cflags = [ | 368 cflags = [ |
369 "-fsanitize=vptr", | 369 "-fsanitize=vptr", |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 # This allows to selectively disable ubsan_vptr, when needed. In particular, | 403 # This allows to selectively disable ubsan_vptr, when needed. In particular, |
404 # if some third_party code is required to be compiled without rtti, which | 404 # if some third_party code is required to be compiled without rtti, which |
405 # is a requirement for ubsan_vptr. | 405 # is a requirement for ubsan_vptr. |
406 config("default_sanitizer_flags_but_ubsan_vptr") { | 406 config("default_sanitizer_flags_but_ubsan_vptr") { |
407 configs = all_sanitizer_configs - [ ":ubsan_vptr_flags" ] | 407 configs = all_sanitizer_configs - [ ":ubsan_vptr_flags" ] |
408 } | 408 } |
409 | 409 |
410 config("default_sanitizer_flags_but_coverage") { | 410 config("default_sanitizer_flags_but_coverage") { |
411 configs = all_sanitizer_configs - [ ":coverage_flags" ] | 411 configs = all_sanitizer_configs - [ ":coverage_flags" ] |
412 } | 412 } |
OLD | NEW |