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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 env = self._GetEnv(arch) | 116 env = self._GetEnv(arch) |
117 if use_separate_mspdbsrv == 'True': | 117 if use_separate_mspdbsrv == 'True': |
118 self._UseSeparateMspdbsrv(env, args) | 118 self._UseSeparateMspdbsrv(env, args) |
119 link = subprocess.Popen([args[0].replace('/', '\\')] + list(args[1:]), | 119 link = subprocess.Popen([args[0].replace('/', '\\')] + list(args[1:]), |
120 shell=True, | 120 shell=True, |
121 env=env, | 121 env=env, |
122 stdout=subprocess.PIPE, | 122 stdout=subprocess.PIPE, |
123 stderr=subprocess.STDOUT) | 123 stderr=subprocess.STDOUT) |
124 out, _ = link.communicate() | 124 out, _ = link.communicate() |
125 for line in out.splitlines(): | 125 for line in out.splitlines(): |
126 if not line.startswith(' Creating library '): | 126 if (not line.startswith(' Creating library ') and |
| 127 not line.startswith('Generating code') and |
| 128 not line.startswith('Finished generating code')): |
127 print line | 129 print line |
128 return link.returncode | 130 return link.returncode |
129 | 131 |
130 def ExecLinkWithManifests(self, arch, embed_manifest, out, ldcmd, resname, | 132 def ExecLinkWithManifests(self, arch, embed_manifest, out, ldcmd, resname, |
131 mt, rc, intermediate_manifest, *manifests): | 133 mt, rc, intermediate_manifest, *manifests): |
132 """A wrapper for handling creating a manifest resource and then executing | 134 """A wrapper for handling creating a manifest resource and then executing |
133 a link command.""" | 135 a link command.""" |
134 # The 'normal' way to do manifests is to have link generate a manifest | 136 # The 'normal' way to do manifests is to have link generate a manifest |
135 # based on gathering dependencies from the object files, then merge that | 137 # based on gathering dependencies from the object files, then merge that |
136 # manifest with other manifests supplied as sources, convert the merged | 138 # manifest with other manifests supplied as sources, convert the merged |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 project_dir = os.path.relpath(project_dir, BASE_DIR) | 305 project_dir = os.path.relpath(project_dir, BASE_DIR) |
304 selected_files = selected_files.split(';') | 306 selected_files = selected_files.split(';') |
305 ninja_targets = [os.path.join(project_dir, filename) + '^^' | 307 ninja_targets = [os.path.join(project_dir, filename) + '^^' |
306 for filename in selected_files] | 308 for filename in selected_files] |
307 cmd = ['ninja.exe'] | 309 cmd = ['ninja.exe'] |
308 cmd.extend(ninja_targets) | 310 cmd.extend(ninja_targets) |
309 return subprocess.call(cmd, shell=True, cwd=BASE_DIR) | 311 return subprocess.call(cmd, shell=True, cwd=BASE_DIR) |
310 | 312 |
311 if __name__ == '__main__': | 313 if __name__ == '__main__': |
312 sys.exit(main(sys.argv[1:])) | 314 sys.exit(main(sys.argv[1:])) |
OLD | NEW |