| 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)))
|
|
|