Do not add rpaths for static libs. Closes #5191.

pull/7425/head
Jussi Pakkanen 4 years ago committed by Nirbheek Chauhan
parent 4974fa39ac
commit 804a71e8f2
  1. 3
      mesonbuild/build.py
  2. 7
      run_unittests.py

@ -819,7 +819,8 @@ class BuildTarget(Target):
def get_link_dep_subdirs(self):
result = OrderedSet()
for i in self.link_targets:
result.add(i.get_subdir())
if not isinstance(i, StaticLibrary):
result.add(i.get_subdir())
result.update(i.get_link_dep_subdirs())
return result

@ -7030,6 +7030,13 @@ c = ['{0}']
windows_proof_rmtree(os.path.join(testdir, 'subprojects', 'foo'))
os.unlink(wrap_filename)
def test_no_rpath_for_static(self):
testdir = os.path.join(self.common_test_dir, '5 linkstatic')
self.init(testdir)
self.build()
build_rpath = get_rpath(os.path.join(self.builddir, 'prog'))
self.assertIsNone(build_rpath)
class BaseLinuxCrossTests(BasePlatformTests):
# Don't pass --libdir when cross-compiling. We have tests that

Loading…
Cancel
Save