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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | tools/gn/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 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/allocator.gni") 5 import("//build/config/allocator.gni")
6 import("//build/config/chrome_build.gni") 6 import("//build/config/chrome_build.gni")
7 import("//build/config/crypto.gni") 7 import("//build/config/crypto.gni")
8 import("//build/config/features.gni") 8 import("//build/config/features.gni")
9 import("//build/config/sanitizers/sanitizers.gni") 9 import("//build/config/sanitizers/sanitizers.gni")
10 import("//build/config/ui.gni") 10 import("//build/config/ui.gni")
11 import("//build/module_args/v8.gni") 11 import("//build/module_args/v8.gni")
12 import("//build/toolchain/goma.gni") 12 import("//build/toolchain/goma.gni")
13 13
14 declare_args() { 14 declare_args() {
15 # When set, turns off the (normally-on) iterator debugging and related stuff 15 # When set (the default) enables C++ iterator debugging in debug builds.
16 # that is normally turned on for Debug builds. These are generally useful for 16 # Iterator debugging is always off in release builds (technically, this flag
17 # catching bugs but in some cases may cause conflicts or excessive slowness. 17 # affects the "debug" config, which is always available but applied by
18 disable_iterator_debugging = false 18 # default only in debug builds).
19 #
20 # Iterator debugging is generally useful for catching bugs. But it can
21 # introduce extra locking to check the state of an iterator against the state
22 # of the current object. For iterator- and thread-heavy code, this can
23 # significantly slow execution.
24 enable_iterator_debugging = true
19 25
20 # Set to true to not store any build metadata, e.g. ifdef out all __DATE__ 26 # Set to true to not store any build metadata, e.g. ifdef out all __DATE__
21 # and __TIME__. Set to 0 to reenable the use of these macros in the code 27 # and __TIME__. Set to 0 to reenable the use of these macros in the code
22 # base. See http://crbug.com/314403. 28 # base. See http://crbug.com/314403.
23 # 29 #
24 # Continue to embed build meta data in Official builds, basically the 30 # Continue to embed build meta data in Official builds, basically the
25 # time it was built. 31 # time it was built.
26 # TODO(maruel): This decision should be revisited because having an 32 # TODO(maruel): This decision should be revisited because having an
27 # official deterministic build has high value too but MSVC toolset can't 33 # official deterministic build has high value too but MSVC toolset can't
28 # generate anything deterministic with WPO enabled AFAIK. 34 # generate anything deterministic with WPO enabled AFAIK.
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 "_DEBUG", 298 "_DEBUG",
293 "DYNAMIC_ANNOTATIONS_ENABLED=1", 299 "DYNAMIC_ANNOTATIONS_ENABLED=1",
294 "WTF_USE_DYNAMIC_ANNOTATIONS=1", 300 "WTF_USE_DYNAMIC_ANNOTATIONS=1",
295 ] 301 ]
296 302
297 if (is_nacl) { 303 if (is_nacl) {
298 defines += [ "DYNAMIC_ANNOTATIONS_PREFIX=NACL_" ] 304 defines += [ "DYNAMIC_ANNOTATIONS_PREFIX=NACL_" ]
299 } 305 }
300 306
301 if (is_win) { 307 if (is_win) {
302 if (disable_iterator_debugging) { 308 if (!enable_iterator_debugging) {
303 # Iterator debugging is enabled by the compiler on debug builds, and we 309 # Iterator debugging is enabled by default by the compiler on debug
304 # have to tell it to turn it off. 310 # builds, and we have to tell it to turn it off.
305 defines += [ "_HAS_ITERATOR_DEBUGGING=0" ] 311 defines += [ "_HAS_ITERATOR_DEBUGGING=0" ]
306 } 312 }
307 } else if (is_linux && !is_android && current_cpu == "x64" && 313 } else if (is_linux && current_cpu == "x64" && enable_iterator_debugging) {
308 !disable_iterator_debugging) {
309 # Enable libstdc++ debugging facilities to help catch problems early, see 314 # Enable libstdc++ debugging facilities to help catch problems early, see
310 # http://crbug.com/65151 . 315 # http://crbug.com/65151 .
311 # TODO(phajdan.jr): Should we enable this for all of POSIX? 316 # TODO(phajdan.jr): Should we enable this for all of POSIX?
312 defines += [ "_GLIBCXX_DEBUG=1" ] 317 defines += [ "_GLIBCXX_DEBUG=1" ]
313 } 318 }
314 } 319 }
315 320
316 config("release") { 321 config("release") {
317 defines = [ "NDEBUG" ] 322 defines = [ "NDEBUG" ]
318 323
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 # with precompiled headers since the source file that's "compiled" for 442 # with precompiled headers since the source file that's "compiled" for
438 # making the precompiled header is empty. 443 # making the precompiled header is empty.
439 # 444 #
440 # This error doesn't happen every time. In VS2013, it seems if the .pch 445 # This error doesn't happen every time. In VS2013, it seems if the .pch
441 # file doesn't exist, no error will be generated (probably MS tested this 446 # file doesn't exist, no error will be generated (probably MS tested this
442 # case but forgot the other one?). To reproduce this error, do a build, 447 # case but forgot the other one?). To reproduce this error, do a build,
443 # then delete the precompile.c.obj file, then build again. 448 # then delete the precompile.c.obj file, then build again.
444 cflags_c = [ "/wd4206" ] 449 cflags_c = [ "/wd4206" ]
445 } 450 }
446 } 451 }
OLDNEW
« 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