aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/c.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-11-16 19:43:11 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2018-11-17 16:26:02 +0200
commitaa20c91e6e03373cd00af110a56640d3f51205cd (patch)
tree85bbf96638737489a6bd616a5ca64bebd8a46314 /mesonbuild/compilers/c.py
parenta2a96bda744c932f0f05cce487575ebd094d8c01 (diff)
downloadmeson-aa20c91e6e03373cd00af110a56640d3f51205cd.zip
meson-aa20c91e6e03373cd00af110a56640d3f51205cd.tar.gz
meson-aa20c91e6e03373cd00af110a56640d3f51205cd.tar.bz2
Guard against broken lib paths returned by gcc.
Diffstat (limited to 'mesonbuild/compilers/c.py')
-rw-r--r--mesonbuild/compilers/c.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py
index 1b198b6..547d59f 100644
--- a/mesonbuild/compilers/c.py
+++ b/mesonbuild/compilers/c.py
@@ -229,12 +229,15 @@ class CCompiler(Compiler):
# which is wrong and breaks things. Store everything, just to be sure.
pobj = Path(p)
unresolved = pobj.as_posix()
- resolved = Path(p).resolve().as_posix()
if pobj.exists():
if unresolved not in paths:
paths.append(unresolved)
- if resolved not in paths:
- paths.append(resolved)
+ try:
+ resolved = Path(p).resolve().as_posix()
+ if resolved not in paths:
+ paths.append(resolved)
+ except FileNotFoundError:
+ pass
return tuple(paths)
def get_compiler_dirs(self, env, name):