Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9032)

Unified Diff: build/config/BUILD.gn

Issue 1256783007: Rename iterator debugging flag in GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/gn/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/BUILD.gn
diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn
index 60f4d1b120aadcd5f94bbf6a2708ca183ba9b06c..d72d4044f3ec3c0a4bcb72bbdde45e0c289dd634 100644
--- a/build/config/BUILD.gn
+++ b/build/config/BUILD.gn
@@ -12,10 +12,16 @@ import("//build/module_args/v8.gni")
import("//build/toolchain/goma.gni")
declare_args() {
- # When set, turns off the (normally-on) iterator debugging and related stuff
- # that is normally turned on for Debug builds. These are generally useful for
- # catching bugs but in some cases may cause conflicts or excessive slowness.
- disable_iterator_debugging = false
+ # When set (the default) enables C++ iterator debugging in debug builds.
+ # Iterator debugging is always off in release builds (technically, this flag
+ # affects the "debug" config, which is always available but applied by
+ # default only in debug builds).
+ #
+ # Iterator debugging is generally useful for catching bugs. But it can
+ # introduce extra locking to check the state of an iterator against the state
+ # of the current object. For iterator- and thread-heavy code, this can
+ # significantly slow execution.
+ enable_iterator_debugging = true
# Set to true to not store any build metadata, e.g. ifdef out all __DATE__
# and __TIME__. Set to 0 to reenable the use of these macros in the code
@@ -299,13 +305,12 @@ config("debug") {
}
if (is_win) {
- if (disable_iterator_debugging) {
- # Iterator debugging is enabled by the compiler on debug builds, and we
- # have to tell it to turn it off.
+ if (!enable_iterator_debugging) {
+ # Iterator debugging is enabled by default by the compiler on debug
+ # builds, and we have to tell it to turn it off.
defines += [ "_HAS_ITERATOR_DEBUGGING=0" ]
}
- } else if (is_linux && !is_android && current_cpu == "x64" &&
- !disable_iterator_debugging) {
+ } else if (is_linux && current_cpu == "x64" && enable_iterator_debugging) {
# Enable libstdc++ debugging facilities to help catch problems early, see
# http://crbug.com/65151 .
# TODO(phajdan.jr): Should we enable this for all of POSIX?
« no previous file with comments | « no previous file | tools/gn/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698