summaryrefslogtreecommitdiffstats
path: root/chrome/chrome_common.gypi
diff options
context:
space:
mode:
authorbrettw <brettw@chromium.org>2015-11-24 18:44:26 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-25 02:45:24 +0000
commit3118dde528359280fa0cb3c6fc5b6323e834c514 (patch)
tree59e8c87ebc2a9afeb9db467a1fe689a91978432c /chrome/chrome_common.gypi
parentb61bdf47278732dd1f73fc0d8a04a25897961b84 (diff)
downloadchromium_src-3118dde528359280fa0cb3c6fc5b6323e834c514.zip
chromium_src-3118dde528359280fa0cb3c6fc5b6323e834c514.tar.gz
chromium_src-3118dde528359280fa0cb3c6fc5b6323e834c514.tar.bz2
New build flag system, convert Google Now flag
This generates headers with build flags rather than forcing them all to be global. It includes an accessor wrapper so that references to the flags will fail if the proper header is not included. Converts Google Now to use this and remove the global google now define and grit define. Adds support for grit define values of "true" and "false" for ease of integration with GN (they are mapped to the corresponding Python "True" and "False"). Adds dependencies from the main gyp targets to the new generated feature define target. Since GYP only does hard dependencies one level, this should reduce the chance that somebody adds more of these cases and forces to add a dependency. Review URL: https://codereview.chromium.org/1458653002 Cr-Commit-Position: refs/heads/master@{#361527}
Diffstat (limited to 'chrome/chrome_common.gypi')
-rw-r--r--chrome/chrome_common.gypi13
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome/chrome_common.gypi b/chrome/chrome_common.gypi
index 1438853..73de6df 100644
--- a/chrome/chrome_common.gypi
+++ b/chrome/chrome_common.gypi
@@ -314,6 +314,7 @@
# TODO(gregoryd): chrome_resources and chrome_strings could be
# shared with the 64-bit target, but it does not work due to a gyp
# issue.
+ 'chrome_common_features',
'installer_util',
'safe_browsing_proto',
'<(DEPTH)/base/base.gyp:base',
@@ -564,6 +565,7 @@
'common/net/x509_certificate_model_openssl.cc',
],
'dependencies': [
+ 'chrome_common_features',
'<(DEPTH)/base/base.gyp:base',
'<(DEPTH)/chrome/chrome_resources.gyp:chrome_resources',
'<(DEPTH)/chrome/chrome_resources.gyp:chrome_strings',
@@ -653,5 +655,16 @@
'../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
],
},
+ {
+ # GN version: //chrome/common:features
+ 'target_name': 'chrome_common_features',
+ 'includes': [ '../build/buildflag_header.gypi' ],
+ 'variables': {
+ 'buildflag_header_path': 'chrome/common/features.h',
+ 'buildflag_flags': [
+ 'ENABLE_GOOGLE_NOW=<(enable_google_now)',
+ ],
+ },
+ },
],
}