Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Side by Side Diff: pylib/gyp/win_tool.py

Issue 133503003: ninja win: Allow parent environment variables through when running actions (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # Copyright (c) 2012 Google Inc. All rights reserved. 3 # Copyright (c) 2012 Google Inc. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """Utility functions for Windows builds. 7 """Utility functions for Windows builds.
8 8
9 These functions are executed via gyp-win-tool when using the ninja generator. 9 These functions are executed via gyp-win-tool when using the ninja generator.
10 """ 10 """
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 if (not line.startswith('Microsoft (R) Windows (R) Resource Compiler') and 271 if (not line.startswith('Microsoft (R) Windows (R) Resource Compiler') and
272 not line.startswith('Copyright (C) Microsoft Corporation') and 272 not line.startswith('Copyright (C) Microsoft Corporation') and
273 line): 273 line):
274 print line 274 print line
275 return popen.returncode 275 return popen.returncode
276 276
277 def ExecActionWrapper(self, arch, rspfile, *dir): 277 def ExecActionWrapper(self, arch, rspfile, *dir):
278 """Runs an action command line from a response file using the environment 278 """Runs an action command line from a response file using the environment
279 for |arch|. If |dir| is supplied, use that as the working directory.""" 279 for |arch|. If |dir| is supplied, use that as the working directory."""
280 env = self._GetEnv(arch) 280 env = self._GetEnv(arch)
281 # TODO(scottmg): This is a temporary hack to get some specific variables
282 # through to actions that are set after gyp-time. http://crbug.com/333738.
283 for k, v in os.environ.iteritems():
284 if k not in env:
285 env[k] = v
281 args = open(rspfile).read() 286 args = open(rspfile).read()
282 dir = dir[0] if dir else None 287 dir = dir[0] if dir else None
283 return subprocess.call(args, shell=True, env=env, cwd=dir) 288 return subprocess.call(args, shell=True, env=env, cwd=dir)
284 289
285 if __name__ == '__main__': 290 if __name__ == '__main__':
286 sys.exit(main(sys.argv[1:])) 291 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698