aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2020-07-19 18:44:18 +0300
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2020-07-20 14:14:49 +0000
commit804a71e8f2b7c1011c91bd016df435fc952677a0 (patch)
tree9fe70c0b66dd6a480e75ddd8dfbd19580298512c
parent4974fa39ac68b5bec8c61e630ae7cf268a086b87 (diff)
downloadmeson-804a71e8f2b7c1011c91bd016df435fc952677a0.zip
meson-804a71e8f2b7c1011c91bd016df435fc952677a0.tar.gz
meson-804a71e8f2b7c1011c91bd016df435fc952677a0.tar.bz2
Do not add rpaths for static libs. Closes #5191.
-rw-r--r--mesonbuild/build.py3
-rwxr-xr-xrun_unittests.py7
2 files changed, 9 insertions, 1 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
index d7f3b66..a06979c 100644
--- a/mesonbuild/build.py
+++ b/mesonbuild/build.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
diff --git a/run_unittests.py b/run_unittests.py
index 820b705..aba77d5 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -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