diff options
author | Bruce Richardson <bruce.richardson@intel.com> | 2018-07-02 17:11:43 +0100 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2018-07-03 12:50:17 +0000 |
commit | 755ec53a6b882b5c82fa82b5c2ff8ddc31c002ef (patch) | |
tree | 71c1e5de87711f089d84d1916c99144cb5b5c889 /mesonbuild/compilers/c.py | |
parent | 8aba4aa2d7a40de43bcd4b56ba5f75a7c043bb66 (diff) | |
download | meson-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.
Diffstat (limited to 'mesonbuild/compilers/c.py')
-rw-r--r-- | mesonbuild/compilers/c.py | 2 |
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): |