aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Richardson <bruce.richardson@intel.com>2018-07-02 17:11:43 +0100
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2018-07-03 12:50:17 +0000
commit755ec53a6b882b5c82fa82b5c2ff8ddc31c002ef (patch)
tree71c1e5de87711f089d84d1916c99144cb5b5c889
parent8aba4aa2d7a40de43bcd4b56ba5f75a7c043bb66 (diff)
downloadmeson-755ec53a6b882b5c82fa82b5c2ff8ddc31c002ef.zip
meson-755ec53a6b882b5c82fa82b5c2ff8ddc31c002ef.tar.gz
meson-755ec53a6b882b5c82fa82b5c2ff8ddc31c002ef.tar.bz2
prune nonexistent dirs from library search path
Rather than storing in the cache of search paths the full list returned from the compiler and having each call ignore the non-existent ones, remove from the list all non-existent ones before returning to the caching function.
-rw-r--r--mesonbuild/compilers/c.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py
index e23f412..f3ce4d8 100644
--- a/mesonbuild/compilers/c.py
+++ b/mesonbuild/compilers/c.py
@@ -173,7 +173,7 @@ class CCompiler(Compiler):
for line in stdo.split('\n'):
if line.startswith('libraries:'):
libstr = line.split('=', 1)[1]
- paths = [os.path.realpath(p) for p in libstr.split(':')]
+ paths = [os.path.realpath(p) for p in libstr.split(':') if os.path.exists(os.path.realpath(p))]
return paths
def get_library_dirs(self):