Reviewers: Mads Ager,

Message:
Mark Mentovai ran into this; he sets a variable named ENV in his
environment, and the import of all user variables into the construction
environment conflicted with SCons' use.

Description:
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

Please review this at http://codereview.chromium.org/173294

SVN Base: http://v8.googlecode.com/svn/trunk/

Affected files:
   M     SConstruct


Index: SConstruct
===================================================================
--- SConstruct  (revision 2739)
+++ SConstruct  (working copy)
@@ -789,7 +789,16 @@

    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()
+  for var in ('ENV',):
+    try:
+      del user_environ[var]
+    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)



--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to