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

Unified Diff: pylib/gyp/generator/ninja.py

Issue 11821060: Change ninja rpath generation to be more like make. Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/linux/gyptest-implicit-rpath.py » ('j') | test/linux/gyptest-implicit-rpath.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/generator/ninja.py
===================================================================
--- pylib/gyp/generator/ninja.py (revision 1558)
+++ pylib/gyp/generator/ninja.py (working copy)
@@ -898,12 +898,12 @@
extra_bindings.append(('postbuilds',
self.GetPostbuildCommand(spec, output, output)))
+ is_executable = spec['type'] == 'executable'
if self.flavor == 'mac':
ldflags = self.xcode_settings.GetLdflags(config_name,
self.ExpandSpecial(generator_default_variables['PRODUCT_DIR']),
self.GypPathToNinja)
elif self.flavor == 'win':
- is_executable = spec['type'] == 'executable'
manifest_name = self.GypPathToUniqueOutput(
self.ComputeOutputFileName(spec))
ldflags, manifest_files = self.msvs_settings.GetLdflags(config_name,
@@ -911,6 +911,8 @@
self.WriteVariableList('manifests', manifest_files)
else:
ldflags = config.get('ldflags', [])
+ if is_executable and len(solibs):
+ ldflags.append('-Wl,-rpath=\$$ORIGIN/lib/')
self.WriteVariableList('ldflags',
gyp.common.uniquer(map(self.ExpandSpecial,
ldflags)))
@@ -1555,7 +1557,7 @@
master_ninja.rule(
'link',
description='LINK $out',
- command=('$ld $ldflags -o $out -Wl,-rpath=\$$ORIGIN/lib '
+ command=('$ld $ldflags -o $out '
'-Wl,--start-group $in $solibs -Wl,--end-group $libs'))
elif flavor == 'win':
master_ninja.rule(
« no previous file with comments | « no previous file | test/linux/gyptest-implicit-rpath.py » ('j') | test/linux/gyptest-implicit-rpath.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698