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

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

Issue 9959128: ninja windows: simpler link-wrapper code (Closed) Base URL: https://gyp.googlecode.com/svn/trunk
Patch Set: Created 8 years, 8 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 shutil.copy2(source, dest) 51 shutil.copy2(source, dest)
52 52
53 def ExecLinkWrapper(self, *args): 53 def ExecLinkWrapper(self, *args):
54 """Filter diagnostic output from link that looks like: 54 """Filter diagnostic output from link that looks like:
55 ' Creating library ui.dll.lib and object ui.dll.exp' 55 ' Creating library ui.dll.lib and object ui.dll.exp'
56 This happens when there are exports from the dll or exe. 56 This happens when there are exports from the dll or exe.
57 """ 57 """
58 popen = subprocess.Popen(args, 58 popen = subprocess.Popen(args,
59 stdout=subprocess.PIPE, 59 stdout=subprocess.PIPE,
60 stderr=subprocess.STDOUT) 60 stderr=subprocess.STDOUT)
61 out, _ = popen.communicate() 61 for line in popen.stdout:
62 for line in out.splitlines():
63 if not line.startswith(' Creating library '): 62 if not line.startswith(' Creating library '):
64 sys.stdout.write(line) 63 sys.stdout.write(line)
65 return popen.returncode 64 return popen.returncode
66 65
67 if __name__ == '__main__': 66 if __name__ == '__main__':
68 sys.exit(main(sys.argv[1:])) 67 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