From 755ec53a6b882b5c82fa82b5c2ff8ddc31c002ef Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Mon, 2 Jul 2018 17:11:43 +0100 Subject: 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. --- mesonbuild/compilers/c.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mesonbuild/compilers') 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): -- cgit v1.1