summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/c.py
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 /mesonbuild/compilers/c.py
parent8aba4aa2d7a40de43bcd4b56ba5f75a7c043bb66 (diff)
downloadmeson-755ec53a6b882b5c82fa82b5c2ff8ddc31c002ef.tar.gz
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.
Diffstat (limited to 'mesonbuild/compilers/c.py')
-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 e23f4128b..f3ce4d898 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):