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

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

Issue 13992005: Fix rpath for components when cross-compiling. (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: linux-only Created 7 years, 8 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/toolsets/gyptest-toolsets.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 copy 5 import copy
6 import hashlib 6 import hashlib
7 import multiprocessing 7 import multiprocessing
8 import os.path 8 import os.path
9 import re 9 import re
10 import signal 10 import signal
(...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 self.GypPathToNinja) 912 self.GypPathToNinja)
913 elif self.flavor == 'win': 913 elif self.flavor == 'win':
914 manifest_name = self.GypPathToUniqueOutput( 914 manifest_name = self.GypPathToUniqueOutput(
915 self.ComputeOutputFileName(spec)) 915 self.ComputeOutputFileName(spec))
916 ldflags, manifest_files = self.msvs_settings.GetLdflags(config_name, 916 ldflags, manifest_files = self.msvs_settings.GetLdflags(config_name,
917 self.GypPathToNinja, self.ExpandSpecial, manifest_name, is_executable) 917 self.GypPathToNinja, self.ExpandSpecial, manifest_name, is_executable)
918 self.WriteVariableList('manifests', manifest_files) 918 self.WriteVariableList('manifests', manifest_files)
919 else: 919 else:
920 ldflags = config.get('ldflags', []) 920 ldflags = config.get('ldflags', [])
921 if is_executable and len(solibs): 921 if is_executable and len(solibs):
922 ldflags.append('-Wl,-rpath=\$$ORIGIN/lib/') 922 rpath = 'lib/'
923 ldflags.append('-Wl,-rpath-link=lib/') 923 if self.toolset != 'target':
924 rpath += self.toolset
925 ldflags.append('-Wl,-rpath=\$$ORIGIN/%s' % rpath)
926 ldflags.append('-Wl,-rpath-link=%s' % rpath)
924 self.WriteVariableList('ldflags', 927 self.WriteVariableList('ldflags',
925 gyp.common.uniquer(map(self.ExpandSpecial, 928 gyp.common.uniquer(map(self.ExpandSpecial,
926 ldflags))) 929 ldflags)))
927 930
928 libraries = gyp.common.uniquer(map(self.ExpandSpecial, 931 libraries = gyp.common.uniquer(map(self.ExpandSpecial,
929 spec.get('libraries', []))) 932 spec.get('libraries', [])))
930 if self.flavor == 'mac': 933 if self.flavor == 'mac':
931 libraries = self.xcode_settings.AdjustLibraries(libraries) 934 libraries = self.xcode_settings.AdjustLibraries(libraries)
932 elif self.flavor == 'win': 935 elif self.flavor == 'win':
933 libraries = self.msvs_settings.AdjustLibraries(libraries) 936 libraries = self.msvs_settings.AdjustLibraries(libraries)
(...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after
1800 arglists.append( 1803 arglists.append(
1801 (target_list, target_dicts, data, params, config_name)) 1804 (target_list, target_dicts, data, params, config_name))
1802 pool.map(CallGenerateOutputForConfig, arglists) 1805 pool.map(CallGenerateOutputForConfig, arglists)
1803 except KeyboardInterrupt, e: 1806 except KeyboardInterrupt, e:
1804 pool.terminate() 1807 pool.terminate()
1805 raise e 1808 raise e
1806 else: 1809 else:
1807 for config_name in config_names: 1810 for config_name in config_names:
1808 GenerateOutputForConfig(target_list, target_dicts, data, params, 1811 GenerateOutputForConfig(target_list, target_dicts, data, params,
1809 config_name) 1812 config_name)
OLDNEW
« no previous file with comments | « no previous file | test/toolsets/gyptest-toolsets.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698