Chromium Code Reviews| 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/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") |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 33 # generate anything deterministic with WPO enabled AFAIK. | 33 # generate anything deterministic with WPO enabled AFAIK. |
| 34 dont_embed_build_metadata = !is_official_build | 34 dont_embed_build_metadata = !is_official_build |
| 35 | 35 |
| 36 # Set to true to enable dcheck in Release builds. | 36 # Set to true to enable dcheck in Release builds. |
| 37 dcheck_always_on = false | 37 dcheck_always_on = false |
| 38 } | 38 } |
| 39 | 39 |
| 40 # TODO(brettw) Most of these should be removed. Instead of global feature | 40 # TODO(brettw) Most of these should be removed. Instead of global feature |
| 41 # flags, we should have more modular flags that apply only to a target and its | 41 # flags, we should have more modular flags that apply only to a target and its |
| 42 # dependents. For example, depending on the "x11" meta-target should define | 42 # dependents. For example, depending on the "x11" meta-target should define |
| 43 # USE_X11 for all dependents so that everything that could use X11 gets the | 43 # USE_X11 for all dependents so that everything that could use X11 gets the |
|
no sievers
2015/11/19 01:14:18
I'm wondering if it's worth doing that.
For gyp i
no sievers
2015/11/19 01:26:52
For 'gn check' to work I *think* I need to specify
| |
| 44 # define, but anything that doesn't depend on X11 doesn't see it. | 44 # define, but anything that doesn't depend on X11 doesn't see it. |
| 45 # | 45 # |
| 46 # For now we define these globally to match the current GYP build. | 46 # For now we define these globally to match the current GYP build. |
| 47 config("feature_flags") { | 47 config("feature_flags") { |
| 48 # TODO(brettw) this probably needs to be parameterized. | 48 # TODO(brettw) this probably needs to be parameterized. |
| 49 defines = [ | 49 defines = [ |
| 50 "V8_DEPRECATION_WARNINGS", # Don't use deprecated V8 APIs anywhere. | 50 "V8_DEPRECATION_WARNINGS", # Don't use deprecated V8 APIs anywhere. |
| 51 "CLD_VERSION=$cld_version", | 51 "CLD_VERSION=$cld_version", |
| 52 ] | 52 ] |
| 53 if (enable_mdns) { | 53 if (enable_mdns) { |
| 54 defines += [ "ENABLE_MDNS=1" ] | 54 defines += [ "ENABLE_MDNS=1" ] |
| 55 } | 55 } |
| 56 if (enable_notifications) { | 56 if (enable_notifications) { |
| 57 defines += [ "ENABLE_NOTIFICATIONS" ] | 57 defines += [ "ENABLE_NOTIFICATIONS" ] |
| 58 } | 58 } |
| 59 if (enable_pepper_cdms) { | 59 if (enable_pepper_cdms) { |
| 60 # TODO(brettw) should probably be "=1" | 60 # TODO(brettw) should probably be "=1" |
| 61 defines += [ "ENABLE_PEPPER_CDMS" ] | 61 defines += [ "ENABLE_PEPPER_CDMS" ] |
| 62 } | 62 } |
| 63 if (enable_browser_cdms) { | 63 if (enable_browser_cdms) { |
| 64 # TODO(brettw) should probably be "=1" | 64 # TODO(brettw) should probably be "=1" |
| 65 defines += [ "ENABLE_BROWSER_CDMS" ] | 65 defines += [ "ENABLE_BROWSER_CDMS" ] |
| 66 } | 66 } |
| 67 if (enable_plugins) { | 67 if (enable_plugins) { |
| 68 defines += [ "ENABLE_PLUGINS=1" ] | 68 defines += [ "ENABLE_PLUGINS=1" ] |
| 69 } | 69 } |
| 70 if (enable_pdf) { | 70 if (enable_pdf) { |
| 71 defines += [ "ENABLE_PDF=1" ] | 71 defines += [ "ENABLE_PDF=1" ] |
| 72 } | 72 } |
| 73 if (is_android) { | |
| 74 if (android_java_ui) { | |
|
mfomitchev
2015/11/19 15:41:05
Why not just do && instead of nested ifs?
| |
| 75 defines += [ "ANDROID_JAVA_UI=1" ] | |
| 76 } | |
| 77 } | |
| 73 if (enable_basic_printing || enable_print_preview) { | 78 if (enable_basic_printing || enable_print_preview) { |
| 74 # Convenience define for ENABLE_BASIC_PRINTING || ENABLE_PRINT_PREVIEW. | 79 # Convenience define for ENABLE_BASIC_PRINTING || ENABLE_PRINT_PREVIEW. |
| 75 defines += [ "ENABLE_PRINTING=1" ] | 80 defines += [ "ENABLE_PRINTING=1" ] |
| 76 if (enable_basic_printing) { | 81 if (enable_basic_printing) { |
| 77 # Enable basic printing support and UI. | 82 # Enable basic printing support and UI. |
| 78 defines += [ "ENABLE_BASIC_PRINTING=1" ] | 83 defines += [ "ENABLE_BASIC_PRINTING=1" ] |
| 79 } | 84 } |
| 80 if (enable_print_preview) { | 85 if (enable_print_preview) { |
| 81 # Enable printing with print preview. | 86 # Enable printing with print preview. |
| 82 # Can be defined without ENABLE_BASIC_PRINTING. | 87 # Can be defined without ENABLE_BASIC_PRINTING. |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 436 # This error doesn't happen every time. In VS2013, it seems if the .pch | 441 # This error doesn't happen every time. In VS2013, it seems if the .pch |
| 437 # file doesn't exist, no error will be generated (probably MS tested this | 442 # file doesn't exist, no error will be generated (probably MS tested this |
| 438 # case but forgot the other one?). To reproduce this error, do a build, | 443 # case but forgot the other one?). To reproduce this error, do a build, |
| 439 # then delete the precompile.c.obj file, then build again. | 444 # then delete the precompile.c.obj file, then build again. |
| 440 cflags_c = [ "/wd4206" ] | 445 cflags_c = [ "/wd4206" ] |
| 441 } else if (is_mac && !is_official_build && !use_goma) { | 446 } else if (is_mac && !is_official_build && !use_goma) { |
| 442 precompiled_header = "build/precompile.h" | 447 precompiled_header = "build/precompile.h" |
| 443 precompiled_source = "//build/precompile.h" | 448 precompiled_source = "//build/precompile.h" |
| 444 } | 449 } |
| 445 } | 450 } |
| OLD | NEW |