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

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

Issue 861273003: Reland "msvs/ninja win: Fix support for ImageHasSafeExceptionHandlers" (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: Rebase Created 5 years, 10 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 | « pylib/gyp/msvs_emulation.py ('k') | test/win/gyptest-link-safeseh.py » ('j') | 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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 processing = set(os.path.basename(x) 252 processing = set(os.path.basename(x)
253 for x in lines if x.startswith(prefixes)) 253 for x in lines if x.startswith(prefixes))
254 for line in lines: 254 for line in lines:
255 if not line.startswith(prefixes) and line not in processing: 255 if not line.startswith(prefixes) and line not in processing:
256 print line 256 print line
257 return popen.returncode 257 return popen.returncode
258 258
259 def ExecAsmWrapper(self, arch, *args): 259 def ExecAsmWrapper(self, arch, *args):
260 """Filter logo banner from invocations of asm.exe.""" 260 """Filter logo banner from invocations of asm.exe."""
261 env = self._GetEnv(arch) 261 env = self._GetEnv(arch)
262 # MSVS doesn't assemble x64 asm files.
263 if arch == 'environment.x64':
264 return 0
265 popen = subprocess.Popen(args, shell=True, env=env, 262 popen = subprocess.Popen(args, shell=True, env=env,
266 stdout=subprocess.PIPE, stderr=subprocess.STDOUT) 263 stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
267 out, _ = popen.communicate() 264 out, _ = popen.communicate()
268 for line in out.splitlines(): 265 for line in out.splitlines():
269 if (not line.startswith('Copyright (C) Microsoft Corporation') and 266 if (not line.startswith('Copyright (C) Microsoft Corporation') and
270 not line.startswith('Microsoft (R) Macro Assembler') and 267 not line.startswith('Microsoft (R) Macro Assembler') and
271 not line.startswith(' Assembling: ') and 268 not line.startswith(' Assembling: ') and
272 line): 269 line):
273 print line 270 print line
274 return popen.returncode 271 return popen.returncode
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 project_dir = os.path.relpath(project_dir, BASE_DIR) 303 project_dir = os.path.relpath(project_dir, BASE_DIR)
307 selected_files = selected_files.split(';') 304 selected_files = selected_files.split(';')
308 ninja_targets = [os.path.join(project_dir, filename) + '^^' 305 ninja_targets = [os.path.join(project_dir, filename) + '^^'
309 for filename in selected_files] 306 for filename in selected_files]
310 cmd = ['ninja.exe'] 307 cmd = ['ninja.exe']
311 cmd.extend(ninja_targets) 308 cmd.extend(ninja_targets)
312 return subprocess.call(cmd, shell=True, cwd=BASE_DIR) 309 return subprocess.call(cmd, shell=True, cwd=BASE_DIR)
313 310
314 if __name__ == '__main__': 311 if __name__ == '__main__':
315 sys.exit(main(sys.argv[1:])) 312 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « pylib/gyp/msvs_emulation.py ('k') | test/win/gyptest-link-safeseh.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698