diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-12-28 10:14:30 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-12-30 06:34:12 +0530 |
commit | 78e508de1bedea3a6cf06a5901c1693fd3430f28 (patch) | |
tree | af779e8168569f99561563ba9fcde94273cb458e /mesonbuild/environment.py | |
parent | 8fb7d9261a743637b332b71355bc178262dbd206 (diff) | |
download | meson-nirbheek/fix-objc-cpp-detection.tar.gz |
compilers: Fix error when objc/objc++ compilers are not foundnirbheek/fix-objc-cpp-detection
Earlier it would exit with a traceback:
UnboundLocalError: local variable 'out' referenced before assignment
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r-- | mesonbuild/environment.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 858d31d48..0c9a2f3ef 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -608,6 +608,7 @@ class Environment: p, out, err = Popen_safe(compiler + arg) except OSError as e: popen_exceptions[' '.join(compiler + arg)] = e + continue version = search_version(out) if 'Free Software Foundation' in out: defines = self.get_gnu_compiler_defines(compiler) @@ -634,6 +635,7 @@ class Environment: p, out, err = Popen_safe(compiler + arg) except OSError as e: popen_exceptions[' '.join(compiler + arg)] = e + continue version = search_version(out) if 'Free Software Foundation' in out: defines = self.get_gnu_compiler_defines(compiler) |