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 1253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1264 extra_link_deps = any(self.target_outputs.get(dep).Linkable() | 1264 extra_link_deps = any(self.target_outputs.get(dep).Linkable() |
1265 for dep in spec.get('dependencies', []) | 1265 for dep in spec.get('dependencies', []) |
1266 if dep in self.target_outputs) | 1266 if dep in self.target_outputs) |
1267 if spec['type'] == 'none' or (not link_deps and not extra_link_deps): | 1267 if spec['type'] == 'none' or (not link_deps and not extra_link_deps): |
1268 # TODO(evan): don't call this function for 'none' target types, as | 1268 # TODO(evan): don't call this function for 'none' target types, as |
1269 # it doesn't do anything, and we fake out a 'binary' with a stamp file. | 1269 # it doesn't do anything, and we fake out a 'binary' with a stamp file. |
1270 self.target.binary = compile_deps | 1270 self.target.binary = compile_deps |
1271 self.target.type = 'none' | 1271 self.target.type = 'none' |
1272 elif spec['type'] == 'static_library': | 1272 elif spec['type'] == 'static_library': |
1273 self.target.binary = self.ComputeOutput(spec) | 1273 self.target.binary = self.ComputeOutput(spec) |
1274 if (self.flavor not in ('mac', 'openbsd', 'win') and not | 1274 if (self.flavor not in ('mac', 'openbsd', 'netbsd', 'win') and not |
1275 self.is_standalone_static_library): | 1275 self.is_standalone_static_library): |
1276 self.ninja.build(self.target.binary, 'alink_thin', link_deps, | 1276 self.ninja.build(self.target.binary, 'alink_thin', link_deps, |
1277 order_only=compile_deps) | 1277 order_only=compile_deps) |
1278 else: | 1278 else: |
1279 variables = [] | 1279 variables = [] |
1280 if self.xcode_settings: | 1280 if self.xcode_settings: |
1281 libtool_flags = self.xcode_settings.GetLibtoolflags(config_name) | 1281 libtool_flags = self.xcode_settings.GetLibtoolflags(config_name) |
1282 if libtool_flags: | 1282 if libtool_flags: |
1283 variables.append(('libtool_flags', libtool_flags)) | 1283 variables.append(('libtool_flags', libtool_flags)) |
1284 if self.msvs_settings: | 1284 if self.msvs_settings: |
(...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2401 arglists.append( | 2401 arglists.append( |
2402 (target_list, target_dicts, data, params, config_name)) | 2402 (target_list, target_dicts, data, params, config_name)) |
2403 pool.map(CallGenerateOutputForConfig, arglists) | 2403 pool.map(CallGenerateOutputForConfig, arglists) |
2404 except KeyboardInterrupt, e: | 2404 except KeyboardInterrupt, e: |
2405 pool.terminate() | 2405 pool.terminate() |
2406 raise e | 2406 raise e |
2407 else: | 2407 else: |
2408 for config_name in config_names: | 2408 for config_name in config_names: |
2409 GenerateOutputForConfig(target_list, target_dicts, data, params, | 2409 GenerateOutputForConfig(target_list, target_dicts, data, params, |
2410 config_name) | 2410 config_name) |
OLD | NEW |