OLD | NEW |
1 # Copyright (c) 2013 Google Inc. All rights reserved. | 1 # Copyright (c) 2013 Google Inc. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import collections | 5 import collections |
6 import copy | 6 import copy |
7 import hashlib | 7 import hashlib |
8 import json | 8 import json |
9 import multiprocessing | 9 import multiprocessing |
10 import os.path | 10 import os.path |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 elif self.flavor == 'mac' and len(self.archs) > 1: | 476 elif self.flavor == 'mac' and len(self.archs) > 1: |
477 link_deps = collections.defaultdict(list) | 477 link_deps = collections.defaultdict(list) |
478 | 478 |
479 | 479 |
480 if self.flavor == 'win' and self.target.type == 'static_library': | 480 if self.flavor == 'win' and self.target.type == 'static_library': |
481 self.target.component_objs = link_deps | 481 self.target.component_objs = link_deps |
482 | 482 |
483 # Write out a link step, if needed. | 483 # Write out a link step, if needed. |
484 output = None | 484 output = None |
485 is_empty_bundle = not link_deps and not mac_bundle_depends | 485 is_empty_bundle = not link_deps and not mac_bundle_depends |
486 if link_deps or self.target.actions_stamp or actions_depends: | 486 if spec['type'] == 'none': |
| 487 self.ninja.build(spec['target_name'], 'phony') |
| 488 elif link_deps or self.target.actions_stamp or actions_depends: |
487 output = self.WriteTarget(spec, config_name, config, link_deps, | 489 output = self.WriteTarget(spec, config_name, config, link_deps, |
488 self.target.actions_stamp or actions_depends) | 490 self.target.actions_stamp or actions_depends) |
489 if self.is_mac_bundle: | 491 if self.is_mac_bundle: |
490 mac_bundle_depends.append(output) | 492 mac_bundle_depends.append(output) |
491 | 493 |
492 # Bundle all of the above together, if needed. | 494 # Bundle all of the above together, if needed. |
493 if self.is_mac_bundle: | 495 if self.is_mac_bundle: |
494 output = self.WriteMacBundle(spec, mac_bundle_depends, is_empty_bundle) | 496 output = self.WriteMacBundle(spec, mac_bundle_depends, is_empty_bundle) |
495 | 497 |
496 if not output: | 498 if not output: |
(...skipping 1689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2186 arglists.append( | 2188 arglists.append( |
2187 (target_list, target_dicts, data, params, config_name)) | 2189 (target_list, target_dicts, data, params, config_name)) |
2188 pool.map(CallGenerateOutputForConfig, arglists) | 2190 pool.map(CallGenerateOutputForConfig, arglists) |
2189 except KeyboardInterrupt, e: | 2191 except KeyboardInterrupt, e: |
2190 pool.terminate() | 2192 pool.terminate() |
2191 raise e | 2193 raise e |
2192 else: | 2194 else: |
2193 for config_name in config_names: | 2195 for config_name in config_names: |
2194 GenerateOutputForConfig(target_list, target_dicts, data, params, | 2196 GenerateOutputForConfig(target_list, target_dicts, data, params, |
2195 config_name) | 2197 config_name) |
OLD | NEW |