Land patch for sgk@chromium.org:

Don't copy the ENV variable from the users's external environment into
construction environments.  SCons uses this as a dictionary of environment
values for the commands it executes.

BUG=none
TEST=build with the variable ENV set in the user environment

Review URL: http://codereview.chromium.org/173294

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2750 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
ager@chromium.org 2009-08-25 06:31:17 +00:00
parent f736ed3ff8
commit 4058e11719

View File

@ -789,12 +789,20 @@ def BuildSpecific(env, mode, env_overrides):
context = BuildContext(options, env_overrides, samples=SplitList(env['sample']))
library_flags = context.AddRelevantFlags(os.environ, LIBRARY_FLAGS)
# Remove variables which can't be imported from the user's external
# environment into a construction environment.
user_environ = os.environ.copy()
try:
del user_environ['ENV']
except KeyError:
pass
library_flags = context.AddRelevantFlags(user_environ, LIBRARY_FLAGS)
v8_flags = context.AddRelevantFlags(library_flags, V8_EXTRA_FLAGS)
mksnapshot_flags = context.AddRelevantFlags(library_flags, MKSNAPSHOT_EXTRA_FLAGS)
dtoa_flags = context.AddRelevantFlags(library_flags, DTOA_EXTRA_FLAGS)
cctest_flags = context.AddRelevantFlags(v8_flags, CCTEST_EXTRA_FLAGS)
sample_flags = context.AddRelevantFlags(os.environ, SAMPLE_FLAGS)
sample_flags = context.AddRelevantFlags(user_environ, SAMPLE_FLAGS)
d8_flags = context.AddRelevantFlags(library_flags, D8_FLAGS)
context.flags = {