Have all compiler invocations in compdb. Closes #1439.

pull/1446/head
Jussi Pakkanen 8 years ago
parent a795ea3cd4
commit b3aaab3a03
  1. 5
      mesonbuild/backend/ninjabackend.py
  2. 2
      run_unittests.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)

@ -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:

Loading…
Cancel
Save