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

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

Issue 9969078: ninja windows: suppress 'Creating library...' output (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
« pylib/gyp/generator/ninja.py ('K') | « pylib/gyp/generator/ninja.py ('k') | 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 """
11 11
12 import os 12 import os
13 import shutil 13 import shutil
14 import subprocess
14 import sys 15 import sys
15 16
16 17
17 def main(args): 18 def main(args):
18 executor = WinTool() 19 executor = WinTool()
19 exit_code = executor.Dispatch(args) 20 exit_code = executor.Dispatch(args)
20 if exit_code is not None: 21 if exit_code is not None:
21 sys.exit(exit_code) 22 sys.exit(exit_code)
22 23
23 24
(...skipping 18 matching lines...) Expand all
42 if os.path.exists(dest): 43 if os.path.exists(dest):
43 if os.path.isdir(dest): 44 if os.path.isdir(dest):
44 shutil.rmtree(dest) 45 shutil.rmtree(dest)
45 else: 46 else:
46 os.unlink(dest) 47 os.unlink(dest)
47 if os.path.isdir(source): 48 if os.path.isdir(source):
48 shutil.copytree(source, dest) 49 shutil.copytree(source, dest)
49 else: 50 else:
50 shutil.copy2(source, dest) 51 shutil.copy2(source, dest)
51 52
53 def ExecLinkSuppressImportLibName(self, *args):
54 """Filter diagnostic output from link that looks like:
55 ' Creating library ui.dll.lib and object ui.dll.exp'
56 This happens when there are exports from the dll or exe.
57 """
58 popen = subprocess.Popen(args,
59 stdout=subprocess.PIPE,
60 stderr=subprocess.STDOUT)
61 out, _ = popen.communicate()
Nico 2012/04/03 23:00:39 nit: for line in out: if not line.startswith('
62 lines = filter(lambda x: not x.startswith(' Creating library '),
63 out.splitlines())
64 sys.stdout.write('\n'.join(lines))
65 return popen.returncode
52 66
53 if __name__ == '__main__': 67 if __name__ == '__main__':
54 sys.exit(main(sys.argv[1:])) 68 sys.exit(main(sys.argv[1:]))
OLDNEW
« pylib/gyp/generator/ninja.py ('K') | « pylib/gyp/generator/ninja.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698