summaryrefslogtreecommitdiffstats
path: root/build/gyp_chromium
diff options
context:
space:
mode:
authorvandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-06 01:53:24 +0000
committervandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-06 01:53:24 +0000
commit1cc4cec99777d7731af17de4607874196c42d7d9 (patch)
tree46394fddb7fab3635b58f1e9543bea6b8222832b /build/gyp_chromium
parent96efe1c207a43c16c49f52b72e4ff4811cd1338b (diff)
downloadchromium_src-1cc4cec99777d7731af17de4607874196c42d7d9.zip
chromium_src-1cc4cec99777d7731af17de4607874196c42d7d9.tar.gz
chromium_src-1cc4cec99777d7731af17de4607874196c42d7d9.tar.bz2
Revert 166085 - Selective build clobbering feature (landmines.py and android build scripts).
It looks like this made win extract_build fail. Adds the ability for devs/troopers/etc. to set 'landmines' in the tree so that the build will selectively clobber when a builder moves over a revision with such a change. This cl has an basis landmines.py, and hooks the clobber mechanism to the android build scripts. The relevant cl which implements this for compile.py is here: https://chromiumcodereview.appspot.com/11234013/ I'm planning to also implement an informational invocation for gclient to let devs know about any potential landmines so they can decide if they need to clobber. R=cmp,maruel@chromium.org BUG=121897 Review URL: https://chromiumcodereview.appspot.com/11175016 TBR=iannucci@chromium.org Review URL: https://codereview.chromium.org/11293111 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166105 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/gyp_chromium')
-rwxr-xr-xbuild/gyp_chromium36
1 files changed, 34 insertions, 2 deletions
diff --git a/build/gyp_chromium b/build/gyp_chromium
index 499fa5c..d134034 100755
--- a/build/gyp_chromium
+++ b/build/gyp_chromium
@@ -8,7 +8,6 @@
# is invoked by Chromium beyond what can be done in the gclient hooks.
import glob
-import gyp_helper
import os
import shlex
import subprocess
@@ -45,6 +44,36 @@ if sys.platform == 'win32':
else:
psyco = None
+def apply_gyp_environment(file_path=None):
+ """
+ Reads in a *.gyp_env file and applies the valid keys to os.environ.
+ """
+ if not file_path or not os.path.exists(file_path):
+ return
+ file_contents = open(file_path).read()
+ try:
+ file_data = eval(file_contents, {'__builtins__': None}, None)
+ except SyntaxError, e:
+ e.filename = os.path.abspath(file_path)
+ raise
+ supported_vars = ( 'CC',
+ 'CHROMIUM_GYP_FILE',
+ 'CHROMIUM_GYP_SYNTAX_CHECK',
+ 'CXX',
+ 'GYP_DEFINES',
+ 'GYP_GENERATOR_FLAGS',
+ 'GYP_GENERATOR_OUTPUT',
+ 'GYP_GENERATORS', )
+ for var in supported_vars:
+ val = file_data.get(var)
+ if val:
+ if var in os.environ:
+ print 'INFO: Environment value for "%s" overrides value in %s.' % (
+ var, os.path.abspath(file_path)
+ )
+ else:
+ os.environ[var] = val
+
def additional_include_files(args=[]):
"""
Returns a list of additional (.gypi) files to include, without
@@ -95,7 +124,10 @@ if __name__ == '__main__':
p.communicate()
sys.exit(p.returncode)
- gyp_helper.apply_chromium_gyp_env()
+ if 'SKIP_CHROMIUM_GYP_ENV' not in os.environ:
+ # Update the environment based on chromium.gyp_env
+ gyp_env_path = os.path.join(os.path.dirname(chrome_src), 'chromium.gyp_env')
+ apply_gyp_environment(gyp_env_path)
# This could give false positives since it doesn't actually do real option
# parsing. Oh well.