summaryrefslogtreecommitdiffstats
path: root/build/buildflag_header.gypi
diff options
context:
space:
mode:
authorbrettw <brettw@chromium.org>2015-11-25 14:24:44 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-25 22:25:43 +0000
commitc7cde6acb654b2c9cef527c0e8ac262d480c9f06 (patch)
tree1732b7fd0e4832ea9b5e122b80dd74e45e50a6d0 /build/buildflag_header.gypi
parentd4bd2aafb9eb736fa1cf3844cb389c30d91aa7db (diff)
downloadchromium_src-c7cde6acb654b2c9cef527c0e8ac262d480c9f06.zip
chromium_src-c7cde6acb654b2c9cef527c0e8ac262d480c9f06.tar.gz
chromium_src-c7cde6acb654b2c9cef527c0e8ac262d480c9f06.tar.bz2
Revert of New build flag system, convert Google Now flag (patchset #2 id:20001 of https://codereview.chromium.org/1475513006/ )
Reason for revert: https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Win%20x64%20Builder%20%28dbg%29/builds/69779/steps/compile/logs/stdio Original issue's description: > 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. > > Reland of https://codereview.chromium.org/1458653002/ > TBR=mark@chromium.org > > Committed: https://crrev.com/cbc1cd295bc85219ad89326457cd7f5cf003d41c > Cr-Commit-Position: refs/heads/master@{#361741} TBR=mark@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1480693003 Cr-Commit-Position: refs/heads/master@{#361749}
Diffstat (limited to 'build/buildflag_header.gypi')
-rw-r--r--build/buildflag_header.gypi118
1 files changed, 0 insertions, 118 deletions
diff --git a/build/buildflag_header.gypi b/build/buildflag_header.gypi
deleted file mode 100644
index 730ef429..0000000
--- a/build/buildflag_header.gypi
+++ /dev/null
@@ -1,118 +0,0 @@
-# Copyright 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# Generates a header with preprocessor defines specified by the build file.
-#
-# The canonical documentation is in build/buildflag_header.gni. You should
-# write the GN build, get it working, and then transform it into GYP.
-#
-# In every target that uses your generated header you must include a dependency
-# on the GYP target that generates the header (this is implicit in GN).
-# Otherwise, clean builds may not necessarily create the header before the
-# source code is compiled.
-#
-# Assuming your GN code looks like this:
-#
-# buildflag_header("foo_features") {
-# header = "foo_features.h"
-# flags = [
-# "ENABLE_DOOM_MELON=$enable_doom_melon",
-# "ENABLE_SPACE_LASER=true",
-# "SPAM_SERVER_URL=\"http://www.example.com/\"",
-# ]
-# }
-#
-# Write a GYP target like this:
-#
-# {
-# # GN version: //foo:foo_features
-# 'target_name': 'foo_foo_features',
-# 'includes': [ '../build/buildflag_header.gypi' ],
-# 'variables': {
-# 'buildflag_header_path': 'foo/foo_features.h',
-# 'buildflag_header_flags': [
-# 'ENABLE_DOOM_MELON=<(enable_doom_melon)',
-# 'ENABLE_SPACE_LASER=true',
-# 'SPAM_SERVER_URL="http://www.example.com/"',
-# ],
-# },
-# }
-#
-# Variables
-#
-# target_name
-# Base this on the GN label, replacing / and : with _ to make it globally
-# unique.
-#
-# buildflag_header_path
-# This must be the full path to the header from the source root. In GN
-# you only say "features.h" and it uses the BUILD file's path implicitly.
-# Use the path to BUILD.gn followed by your header name to produce the
-# same output file.
-#
-# buildflag_flags (optional)
-# List of the same format as GN's "flags". To expand variables, use
-# "<(foo)" where GN would have used "$foo".
-#
-# includes
-# List the relative path to build/buildflag_header.gypi from the .gyp
-# file including this code, Note: If your code is in a .gypi file in a
-# different directory, this must be relative to the .gyp including your
-# file.
-#
-#
-# Grit defines
-#
-# Follow the same advice as in the buildflag_header.gni, except on the grit
-# action use the variable name 'grit_additional_defines' and explicitly add a
-# '-D' in front:
-#
-# 'grit_grd_file': 'foo.grd',
-# 'grit_additional_defines': [
-# '-D', 'enable_doom_melon=<(enable_doom_melon)',
-# ],
-#
-# Put shared lists of defines in a .gypi.
-
-{
- 'type': 'none',
- 'hard_dependency': 1,
-
- 'actions': [
- {
- 'action_name': 'buildflag_header',
- 'variables': {
- # Default these values to empty if they're not defined.
- 'variables': {
- 'buildflag_flags%': [],
- },
-
- # Writes the flags to a response file with a name based on the name of
- # this target.
- 'response_file_name': '<|(<(_target_name)_buildflag_header.rsp --flags <@(buildflag_flags))',
-
- 'build_header_script': '<(DEPTH)/build/write_buildflag_header.py',
- },
-
- 'message': 'Generating build header.',
-
- 'inputs': [
- '<(build_header_script)',
- '<(response_file_name)',
- ],
-
- 'outputs': [
- '<(SHARED_INTERMEDIATE_DIR)/<(buildflag_header_path)',
- ],
-
- 'action': [
- 'python', '<(build_header_script)',
- '--output', '<(buildflag_header_path)',
- '--rulename', '<(_target_name)',
- '--gen-dir', '<(SHARED_INTERMEDIATE_DIR)',
- '--definitions', '<(response_file_name)',
- ],
- }
- ],
-}