| OLD | NEW |
| 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/chromecast_build.gni") | 7 import("//build/config/chromecast_build.gni") |
| 8 import("//build/config/crypto.gni") | 8 import("//build/config/crypto.gni") |
| 9 import("//build/config/dcheck_always_on.gni") | 9 import("//build/config/dcheck_always_on.gni") |
| 10 import("//build/config/features.gni") | 10 import("//build/config/features.gni") |
| 11 import("//build/config/pch.gni") |
| 11 import("//build/config/sanitizers/sanitizers.gni") | 12 import("//build/config/sanitizers/sanitizers.gni") |
| 12 import("//build/config/ui.gni") | 13 import("//build/config/ui.gni") |
| 13 import("//build/toolchain/goma.gni") | 14 import("//build/toolchain/goma.gni") |
| 14 | 15 |
| 15 # One common error that happens is that GYP-generated headers within gen/ get | 16 # One common error that happens is that GYP-generated headers within gen/ get |
| 16 # included rather than the GN-generated ones within gen/ subdirectories. | 17 # included rather than the GN-generated ones within gen/ subdirectories. |
| 17 # TODO(GYP_GONE): Remove once GYP is gone (as well as exec_script exception). | 18 # TODO(GYP_GONE): Remove once GYP is gone (as well as exec_script exception). |
| 18 assert( | 19 assert( |
| 19 exec_script("//build/dir_exists.py", [ "obj.host" ], "string") == "False", | 20 exec_script("//build/dir_exists.py", [ "obj.host" ], "string") == "False", |
| 20 "GYP artifacts detected in $root_build_dir.$0x0A" + | 21 "GYP artifacts detected in $root_build_dir.$0x0A" + |
| 21 "You must wipe this directory before building with GN.") | 22 "You must wipe this directory before building with GN.") |
| 22 | 23 |
| 23 declare_args() { | 24 declare_args() { |
| 24 # When set (the default) enables C++ iterator debugging in debug builds. | 25 # When set (the default) enables C++ iterator debugging in debug builds. |
| 25 # Iterator debugging is always off in release builds (technically, this flag | 26 # Iterator debugging is always off in release builds (technically, this flag |
| 26 # affects the "debug" config, which is always available but applied by | 27 # affects the "debug" config, which is always available but applied by |
| 27 # default only in debug builds). | 28 # default only in debug builds). |
| 28 # | 29 # |
| 29 # Iterator debugging is generally useful for catching bugs. But it can | 30 # Iterator debugging is generally useful for catching bugs. But it can |
| 30 # introduce extra locking to check the state of an iterator against the state | 31 # introduce extra locking to check the state of an iterator against the state |
| 31 # of the current object. For iterator- and thread-heavy code, this can | 32 # of the current object. For iterator- and thread-heavy code, this can |
| 32 # significantly slow execution. | 33 # significantly slow execution. |
| 33 enable_iterator_debugging = true | 34 enable_iterator_debugging = true |
| 34 | |
| 35 # Normally we try to decide whether to use precompiled headers or | |
| 36 # not based on the other build arguments, but in some cases it is | |
| 37 # easiest to force them off explicitly. | |
| 38 disable_precompiled_headers = false | |
| 39 } | 35 } |
| 40 | 36 |
| 41 # TODO(brettw) Most of these should be removed. Instead of global feature | 37 # TODO(brettw) Most of these should be removed. Instead of global feature |
| 42 # flags, we should have more modular flags that apply only to a target and its | 38 # flags, we should have more modular flags that apply only to a target and its |
| 43 # dependents. For example, depending on the "x11" meta-target should define | 39 # dependents. For example, depending on the "x11" meta-target should define |
| 44 # USE_X11 for all dependents so that everything that could use X11 gets the | 40 # USE_X11 for all dependents so that everything that could use X11 gets the |
| 45 # define, but anything that doesn't depend on X11 doesn't see it. | 41 # define, but anything that doesn't depend on X11 doesn't see it. |
| 46 # | 42 # |
| 47 # For now we define these globally to match the current GYP build. | 43 # For now we define these globally to match the current GYP build. |
| 48 config("feature_flags") { | 44 config("feature_flags") { |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 # file doesn't exist, no error will be generated (probably MS tested this | 455 # file doesn't exist, no error will be generated (probably MS tested this |
| 460 # case but forgot the other one?). To reproduce this error, do a build, | 456 # case but forgot the other one?). To reproduce this error, do a build, |
| 461 # then delete the precompile.c.obj file, then build again. | 457 # then delete the precompile.c.obj file, then build again. |
| 462 cflags_c = [ "/wd4206" ] | 458 cflags_c = [ "/wd4206" ] |
| 463 } else if (is_mac) { | 459 } else if (is_mac) { |
| 464 precompiled_header = "build/precompile.h" | 460 precompiled_header = "build/precompile.h" |
| 465 precompiled_source = "//build/precompile.h" | 461 precompiled_source = "//build/precompile.h" |
| 466 } | 462 } |
| 467 } | 463 } |
| 468 } | 464 } |
| OLD | NEW |