Add a |dcheck_is_configurable| build argument, independent of SyzyASAN.

Previously we gated run-time-configurable DCHECKs on the |is_syzyasan|
argument, to have them built-in to Chrome Canary SyzyASAN binaries.

We implement |dcheck_is_configurable| as a macro define rather than via
a buildflag, because Chromium currently has too many components with
undeclared dependencies on //base for introducing a new dependency of
//base/logging.h on a generated buildflags_header() to be safe.

Bug: 812058
Change-Id: Iac48c88e0c5964cc8bceac6c444e44f84133120e
Reviewed-on: https://chromium-review.googlesource.com/974904
Reviewed-by: Nick Carter <nick@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Wez <wez@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#545542}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a6ca5b9b7a337cdeb8a601932f0300a207c3fe93
This commit is contained in:
Wez 2018-03-23 19:03:07 +00:00 коммит произвёл Commit Bot
Родитель 6694004def
Коммит d1bd7272df
2 изменённых файлов: 10 добавлений и 3 удалений

Просмотреть файл

@ -61,6 +61,9 @@ config("feature_flags") {
defines = [ "V8_DEPRECATION_WARNINGS" ]
if (dcheck_always_on) {
defines += [ "DCHECK_ALWAYS_ON=1" ]
if (dcheck_is_configurable) {
defines += [ "DCHECK_IS_CONFIGURABLE=1" ]
}
}
if (use_udev) {
# TODO(brettw) should probably be "=1".

Просмотреть файл

@ -2,10 +2,14 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/sanitizers/sanitizers.gni")
declare_args() {
# Enables DCHECKs to be built-in, but to default to being non-fatal/log-only.
# DCHECKS can then be set as fatal/non-fatal via the DCheckIsFatal feature.
# See crbug.com/596231 for details on how this is used.
dcheck_is_configurable = false
}
declare_args() {
# Set to true to enable dcheck in Release builds.
# is_syzyasan defaults to logging/non-fatal DCHECKs - see crbug.com/596231.
dcheck_always_on = is_syzyasan
dcheck_always_on = dcheck_is_configurable
}