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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/toolsets/gyptest-toolsets.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/generator/ninja.py
diff --git a/pylib/gyp/generator/ninja.py b/pylib/gyp/generator/ninja.py
index c6bceaf382a74d3bed32c6343cfb848faaf251c3..a2c058123ce750a217faa8433f297582bc7caa39 100644
--- a/pylib/gyp/generator/ninja.py
+++ b/pylib/gyp/generator/ninja.py
@@ -919,8 +919,11 @@ class NinjaWriter:
else:
ldflags = config.get('ldflags', [])
if is_executable and len(solibs):
- ldflags.append('-Wl,-rpath=\$$ORIGIN/lib/')
- ldflags.append('-Wl,-rpath-link=lib/')
+ rpath = 'lib/'
+ if self.toolset != 'target':
+ rpath += self.toolset
+ ldflags.append('-Wl,-rpath=\$$ORIGIN/%s' % rpath)
+ ldflags.append('-Wl,-rpath-link=%s' % rpath)
self.WriteVariableList('ldflags',
gyp.common.uniquer(map(self.ExpandSpecial,
ldflags)))
« 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