From b3aaab3a038f9139f5735d590b5036c25fd033a0 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Thu, 2 Mar 2017 20:25:22 +0200 Subject: [PATCH] Have all compiler invocations in compdb. Closes #1439. --- mesonbuild/backend/ninjabackend.py | 5 +++-- run_unittests.py | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index 5e137cabe..d6960763b 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -210,8 +210,9 @@ 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'] + native_compilers = ['%s_COMPILER' % i for i in self.build.compilers] + cross_compilers = ['%s_CROSS_COMPILER' % i for i in self.build.cross_compilers] + ninja_compdb = [ninja_exe, '-t', 'compdb'] + native_compilers + cross_compilers builddir = self.environment.get_build_dir() try: jsondb = subprocess.check_output(ninja_compdb, cwd=builddir) diff --git a/run_unittests.py b/run_unittests.py index f800d0390..82c1b8098 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -951,6 +951,8 @@ class LinuxlikeTests(BasePlatformTests): for each in compdb: if each['file'].endswith('GLib.Thread.c'): vala_command = each['command'] + elif each['file'].endswith('GLib.Thread.vala'): + continue elif each['file'].endswith('retcode.c'): c_command = each['command'] else: