OLD | NEW |
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 Loading... |
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:])) |
OLD | NEW |