aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/c.py
diff options
context:
space:
mode:
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):