Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Side by Side Diff: pylib/gyp/generator/ninja.py

Issue 1209553002: Do not remote duplicate entries from ldflags when generating ninja files as it changes behavior (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Updated license headers Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | test/ldflags-duplicates/check-ldflags.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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)
OLDNEW
« no previous file with comments | « no previous file | test/ldflags-duplicates/check-ldflags.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698