From 61c6f589f3b7b48434c7dba1adfb94f0e9eead4d Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Thu, 7 Jun 2018 00:15:38 +0530 Subject: [PATCH] backends: Don't exclude system libraries for PATH We reuse the same function for generating PATH, and we don't want to exclude system paths there for obvious reasons. --- mesonbuild/backend/backends.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index 65dad991e..ef677a9ee 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -338,7 +338,7 @@ class Backend: return True return False - def rpaths_for_bundled_shared_libraries(self, target): + def rpaths_for_bundled_shared_libraries(self, target, exclude_system=True): paths = [] for dep in target.external_deps: if not isinstance(dep, (dependencies.ExternalLibrary, dependencies.PkgConfigDependency)): @@ -349,7 +349,7 @@ class Backend: # The only link argument is an absolute path to a library file. libpath = la[0] libdir = os.path.dirname(libpath) - if self._libdir_is_system(libdir, target.compilers): + if exclude_system and self._libdir_is_system(libdir, target.compilers): # No point in adding system paths. continue # Windows doesn't support rpaths, but we use this function to @@ -601,7 +601,7 @@ class Backend: if isinstance(target, build.BuildTarget): prospectives.update(target.get_transitive_link_deps()) # External deps - for deppath in self.rpaths_for_bundled_shared_libraries(target): + for deppath in self.rpaths_for_bundled_shared_libraries(target, exclude_system=False): result.add(os.path.normpath(os.path.join(self.environment.get_build_dir(), deppath))) for bdep in extra_bdeps: prospectives.update(bdep.get_transitive_link_deps())