| 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 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1162 # Respect environment variables related to build, but target-specific | 1162 # Respect environment variables related to build, but target-specific |
| 1163 # flags can still override them. | 1163 # flags can still override them. |
| 1164 ldflags = env_ldflags + config.get('ldflags', []) | 1164 ldflags = env_ldflags + config.get('ldflags', []) |
| 1165 if is_executable and len(solibs): | 1165 if is_executable and len(solibs): |
| 1166 rpath = 'lib/' | 1166 rpath = 'lib/' |
| 1167 if self.toolset != 'target': | 1167 if self.toolset != 'target': |
| 1168 rpath += self.toolset | 1168 rpath += self.toolset |
| 1169 ldflags.append(r'-Wl,-rpath=\$$ORIGIN/%s' % rpath) | 1169 ldflags.append(r'-Wl,-rpath=\$$ORIGIN/%s' % rpath) |
| 1170 ldflags.append('-Wl,-rpath-link=%s' % rpath) | 1170 ldflags.append('-Wl,-rpath-link=%s' % rpath) |
| 1171 self.WriteVariableList(ninja_file, 'ldflags', | 1171 self.WriteVariableList(ninja_file, 'ldflags', |
| 1172 gyp.common.uniquer(map(self.ExpandSpecial, ldflags))) | 1172 map(self.ExpandSpecial, ldflags)) |
| 1173 | 1173 |
| 1174 library_dirs = config.get('library_dirs', []) | 1174 library_dirs = config.get('library_dirs', []) |
| 1175 if self.flavor == 'win': | 1175 if self.flavor == 'win': |
| 1176 library_dirs = [self.msvs_settings.ConvertVSMacros(l, config_name) | 1176 library_dirs = [self.msvs_settings.ConvertVSMacros(l, config_name) |
| 1177 for l in library_dirs] | 1177 for l in library_dirs] |
| 1178 library_dirs = ['/LIBPATH:' + QuoteShellArgument(self.GypPathToNinja(l), | 1178 library_dirs = ['/LIBPATH:' + QuoteShellArgument(self.GypPathToNinja(l), |
| 1179 self.flavor) | 1179 self.flavor) |
| 1180 for l in library_dirs] | 1180 for l in library_dirs] |
| 1181 else: | 1181 else: |
| 1182 library_dirs = [QuoteShellArgument('-L' + self.GypPathToNinja(l), | 1182 library_dirs = [QuoteShellArgument('-L' + self.GypPathToNinja(l), |
| (...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2382 arglists.append( | 2382 arglists.append( |
| 2383 (target_list, target_dicts, data, params, config_name)) | 2383 (target_list, target_dicts, data, params, config_name)) |
| 2384 pool.map(CallGenerateOutputForConfig, arglists) | 2384 pool.map(CallGenerateOutputForConfig, arglists) |
| 2385 except KeyboardInterrupt, e: | 2385 except KeyboardInterrupt, e: |
| 2386 pool.terminate() | 2386 pool.terminate() |
| 2387 raise e | 2387 raise e |
| 2388 else: | 2388 else: |
| 2389 for config_name in config_names: | 2389 for config_name in config_names: |
| 2390 GenerateOutputForConfig(target_list, target_dicts, data, params, | 2390 GenerateOutputForConfig(target_list, target_dicts, data, params, |
| 2391 config_name) | 2391 config_name) |
| OLD | NEW |