Chromium Code Reviews| Index: pylib/gyp/win_tool.py |
| diff --git a/pylib/gyp/win_tool.py b/pylib/gyp/win_tool.py |
| index ba2e86bcb57bbd738a14f395ae935b27f53d5511..331a655957c8dd71091366cf923f7a0b91441535 100644 |
| --- a/pylib/gyp/win_tool.py |
| +++ b/pylib/gyp/win_tool.py |
| @@ -11,6 +11,7 @@ These functions are executed via gyp-win-tool when using the ninja generator. |
| import os |
| import shutil |
| +import subprocess |
| import sys |
| @@ -49,6 +50,19 @@ class WinTool(object): |
| else: |
| shutil.copy2(source, dest) |
| + def ExecLinkWrapper(self, *args): |
| + """Filter diagnostic output from link that looks like: |
| + ' Creating library ui.dll.lib and object ui.dll.exp' |
| + This happens when there are exports from the dll or exe. |
| + """ |
| + popen = subprocess.Popen(args, |
| + stdout=subprocess.PIPE, |
| + stderr=subprocess.STDOUT) |
| + out, _ = popen.communicate() |
| + for line in out.splitlines(): |
|
Nico
2012/04/03 23:13:12
You can just iterate over popen.stdout, which will
|
| + if not line.startswith(' Creating library '): |
| + sys.stdout.write(line) |
| + return popen.returncode |
| if __name__ == '__main__': |
| sys.exit(main(sys.argv[1:])) |