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/features.gni") | 9 import("//build/config/features.gni") |
10 import("//build/config/sanitizers/sanitizers.gni") | 10 import("//build/config/sanitizers/sanitizers.gni") |
11 import("//build/config/ui.gni") | 11 import("//build/config/ui.gni") |
12 import("//build/toolchain/goma.gni") | 12 import("//build/toolchain/goma.gni") |
13 | 13 |
14 # One common error that happens is that GYP-generated headers within gen/ get | 14 # One common error that happens is that GYP-generated headers within gen/ get |
15 # included rather than the GN-generated ones within gen/ subdirectories. | 15 # included rather than the GN-generated ones within gen/ subdirectories. |
16 # TODO(agrieve): Remove once GYP is gone (as well as exec_script exception). | 16 # TODO(GYP_GONE): Remove once GYP is gone (as well as exec_script exception). |
17 assert( | 17 assert( |
18 exec_script("//build/dir_exists.py", [ "obj.host" ], "string") == "False", | 18 exec_script("//build/dir_exists.py", [ "obj.host" ], "string") == "False", |
19 "GYP artifacts detected in $root_build_dir.$0x0A" + | 19 "GYP artifacts detected in $root_build_dir.$0x0A" + |
20 "You must wipe this directory before building with GN.") | 20 "You must wipe this directory before building with GN.") |
21 | 21 |
22 declare_args() { | 22 declare_args() { |
23 # When set (the default) enables C++ iterator debugging in debug builds. | 23 # When set (the default) enables C++ iterator debugging in debug builds. |
24 # Iterator debugging is always off in release builds (technically, this flag | 24 # Iterator debugging is always off in release builds (technically, this flag |
25 # affects the "debug" config, which is always available but applied by | 25 # affects the "debug" config, which is always available but applied by |
26 # default only in debug builds). | 26 # default only in debug builds). |
(...skipping 14 matching lines...) Expand all Loading... | |
41 } | 41 } |
42 | 42 |
43 # TODO(brettw) Most of these should be removed. Instead of global feature | 43 # TODO(brettw) Most of these should be removed. Instead of global feature |
44 # flags, we should have more modular flags that apply only to a target and its | 44 # flags, we should have more modular flags that apply only to a target and its |
45 # dependents. For example, depending on the "x11" meta-target should define | 45 # dependents. For example, depending on the "x11" meta-target should define |
46 # USE_X11 for all dependents so that everything that could use X11 gets the | 46 # USE_X11 for all dependents so that everything that could use X11 gets the |
47 # define, but anything that doesn't depend on X11 doesn't see it. | 47 # define, but anything that doesn't depend on X11 doesn't see it. |
48 # | 48 # |
49 # For now we define these globally to match the current GYP build. | 49 # For now we define these globally to match the current GYP build. |
50 config("feature_flags") { | 50 config("feature_flags") { |
51 # TODO(brettw) this probably needs to be parameterized. | 51 # Don't use deprecated V8 APIs anywhere. |
brettw
2016/05/04 19:51:28
We can parameterize this if and when we need it.
| |
52 defines = [ | 52 defines = [ "V8_DEPRECATION_WARNINGS" ] |
53 "V8_DEPRECATION_WARNINGS", # Don't use deprecated V8 APIs anywhere. | |
54 ] | |
55 if (enable_mdns) { | 53 if (enable_mdns) { |
56 defines += [ "ENABLE_MDNS=1" ] | 54 defines += [ "ENABLE_MDNS=1" ] |
57 } | 55 } |
58 if (enable_notifications) { | 56 if (enable_notifications) { |
59 defines += [ "ENABLE_NOTIFICATIONS" ] | 57 defines += [ "ENABLE_NOTIFICATIONS" ] |
60 } | 58 } |
61 if (enable_pepper_cdms) { | 59 if (enable_pepper_cdms) { |
62 # TODO(brettw) should probably be "=1" | 60 # TODO(brettw) should probably be "=1" |
63 defines += [ "ENABLE_PEPPER_CDMS" ] | 61 defines += [ "ENABLE_PEPPER_CDMS" ] |
64 } | 62 } |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
286 # http://crbug.com/65151 . | 284 # http://crbug.com/65151 . |
287 # TODO(phajdan.jr): Should we enable this for all of POSIX? | 285 # TODO(phajdan.jr): Should we enable this for all of POSIX? |
288 defines += [ "_GLIBCXX_DEBUG=1" ] | 286 defines += [ "_GLIBCXX_DEBUG=1" ] |
289 } | 287 } |
290 } | 288 } |
291 | 289 |
292 config("release") { | 290 config("release") { |
293 defines = [ "NDEBUG" ] | 291 defines = [ "NDEBUG" ] |
294 | 292 |
295 # Sanitizers. | 293 # Sanitizers. |
296 # TODO(GYP) The GYP build has "release_valgrind_build == 0" for this | |
brettw
2016/05/04 19:51:28
Valgrind is gone.
| |
297 # condition. When Valgrind is set up, we need to do the same here. | |
298 if (is_tsan) { | 294 if (is_tsan) { |
299 defines += [ | 295 defines += [ |
300 "DYNAMIC_ANNOTATIONS_ENABLED=1", | 296 "DYNAMIC_ANNOTATIONS_ENABLED=1", |
301 "WTF_USE_DYNAMIC_ANNOTATIONS=1", | 297 "WTF_USE_DYNAMIC_ANNOTATIONS=1", |
302 ] | 298 ] |
303 } else { | 299 } else { |
304 defines += [ "NVALGRIND" ] | 300 defines += [ "NVALGRIND" ] |
305 if (!is_nacl) { | 301 if (!is_nacl) { |
306 # NaCl always enables dynamic annotations. Currently this value is set to | 302 # NaCl always enables dynamic annotations. Currently this value is set to |
307 # 1 for all .nexes. | 303 # 1 for all .nexes. |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
453 # file doesn't exist, no error will be generated (probably MS tested this | 449 # file doesn't exist, no error will be generated (probably MS tested this |
454 # case but forgot the other one?). To reproduce this error, do a build, | 450 # case but forgot the other one?). To reproduce this error, do a build, |
455 # then delete the precompile.c.obj file, then build again. | 451 # then delete the precompile.c.obj file, then build again. |
456 cflags_c = [ "/wd4206" ] | 452 cflags_c = [ "/wd4206" ] |
457 } else if (is_mac) { | 453 } else if (is_mac) { |
458 precompiled_header = "build/precompile.h" | 454 precompiled_header = "build/precompile.h" |
459 precompiled_source = "//build/precompile.h" | 455 precompiled_source = "//build/precompile.h" |
460 } | 456 } |
461 } | 457 } |
462 } | 458 } |
OLD | NEW |