diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2018-11-16 19:43:11 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-11-16 19:43:11 +0200 |
commit | cbb09de3ab22e3712ca9e8ca1fd48832093ec600 (patch) | |
tree | 91af8213e6cbada3cd1fab947118c7d81c25bfca | |
parent | c7a3e81098b8879522a2bbbf733c037d1345d05c (diff) | |
download | meson-armpath.tar.gz |
Guard against broken lib paths returned by gcc.armpath
-rw-r--r-- | mesonbuild/compilers/c.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py index 1b198b645..547d59fc1 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): |