Skip to content

Instantly share code, notes, and snippets.

@indutny
Created April 29, 2014 10:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save indutny/706d42a19841c22a4f99 to your computer and use it in GitHub Desktop.
Save indutny/706d42a19841c22a4f99 to your computer and use it in GitHub Desktop.
diff --git a/tools/wafadmin/Scripting.py b/tools/wafadmin/Scripting.py
index d975bd9..790ad91 100644
--- a/tools/wafadmin/Scripting.py
+++ b/tools/wafadmin/Scripting.py
@@ -256,7 +256,14 @@ def configure(conf):
# (used only by Configure.autoconfig)
env['hash'] = conf.hash
env['files'] = conf.files
- env['environ'] = dict(conf.environ)
+ allowed = [
+ 'PATH', 'NODE_PATH', 'HOME', 'PREFIX_NODE',
+ 'MACOSX_DEPLOYMENT_TARGET', 'PYTHONDIR',
+ 'CC', 'CXX', 'CPP', 'LD',
+ 'TERM', 'COMSPEC', 'DESTDIR',
+ 'NUMBER_OF_PROCESSORS', 'JOBS', 'PREFIX',
+ 'WAFCACHE', 'WAFLOCK' ]
+ env['environ'] = dict((k, v) for k, v in conf.environ.iteritems() if k in allowed)
env['cwd'] = os.path.split(Utils.g_module.root_path)[0]
if Utils.g_module.root_path != src:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment