aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/backend/ninjabackend.py4
-rw-r--r--mesonbuild/environment.py14
-rw-r--r--mesonbuild/modules/gnome.py6
3 files changed, 12 insertions, 12 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index 27e1e9a..ee2c40e 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -210,9 +210,11 @@ int dummy;
# http://clang.llvm.org/docs/JSONCompilationDatabase.html
def generate_compdb(self):
ninja_exe = environment.detect_ninja()
+ ninja_compdb = [ninja_exe, '-t', 'compdb', 'c_COMPILER', 'cpp_COMPILER', 'c_CROSS_COMPILER',
+ 'cpp_CROSS_COMPILER']
builddir = self.environment.get_build_dir()
try:
- jsondb = subprocess.check_output([ninja_exe, '-t', 'compdb', 'c_COMPILER', 'cpp_COMPILER'], cwd=builddir)
+ jsondb = subprocess.check_output(ninja_compdb, cwd=builddir)
with open(os.path.join(builddir, 'compile_commands.json'), 'wb') as f:
f.write(jsondb)
except Exception:
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index 88dc4cf..4bdc4df 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -511,10 +511,11 @@ class Environment:
for compiler in compilers:
if isinstance(compiler, str):
compiler = [compiler]
+ arg = ['--version']
try:
- p, out, err = Popen_safe(compiler + ['--version'])
- except OSError:
- popen_exceptions[' '.join(compiler + [arg])] = e
+ p, out, err = Popen_safe(compiler + arg)
+ except OSError as e:
+ popen_exceptions[' '.join(compiler + arg)] = e
version = search_version(out)
if 'Free Software Foundation' in out:
defines = self.get_gnu_compiler_defines(compiler)
@@ -536,10 +537,11 @@ class Environment:
for compiler in compilers:
if isinstance(compiler, str):
compiler = [compiler]
+ arg = ['--version']
try:
- p, out, err = Popen_safe(compiler + ['--version'])
- except OSError:
- popen_exceptions[' '.join(compiler + [arg])] = e
+ p, out, err = Popen_safe(compiler + arg)
+ except OSError as e:
+ popen_exceptions[' '.join(compiler + arg)] = e
version = search_version(out)
if 'Free Software Foundation' in out:
defines = self.get_gnu_compiler_defines(compiler)
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
index bf4b8be..7c4c42d 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -371,11 +371,7 @@ class GnomeModule(ExtensionModule):
{'native': True})
pkgargs = self.gir_dep.get_compile_args()
except Exception:
- global girwarning_printed
- if not girwarning_printed:
- mlog.warning('gobject-introspection dependency was not found, disabling gir generation.')
- girwarning_printed = True
- return ModuleReturnValue(None, [])
+ raise MesonException('gobject-introspection dependency was not found, gir cannot be generated.')
ns = kwargs.pop('namespace')
nsversion = kwargs.pop('nsversion')
libsources = kwargs.pop('sources')