diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2020-07-19 18:44:18 +0300 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2020-07-20 14:14:49 +0000 |
commit | 804a71e8f2b7c1011c91bd016df435fc952677a0 (patch) | |
tree | 9fe70c0b66dd6a480e75ddd8dfbd19580298512c | |
parent | 4974fa39ac68b5bec8c61e630ae7cf268a086b87 (diff) | |
download | meson-804a71e8f2b7c1011c91bd016df435fc952677a0.zip meson-804a71e8f2b7c1011c91bd016df435fc952677a0.tar.gz meson-804a71e8f2b7c1011c91bd016df435fc952677a0.tar.bz2 |
Do not add rpaths for static libs. Closes #5191.
-rw-r--r-- | mesonbuild/build.py | 3 | ||||
-rwxr-xr-x | run_unittests.py | 7 |
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 |