diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2019-04-10 12:57:05 +0100 |
---|---|---|
committer | Dan Kegel <dank@kegel.com> | 2020-06-05 14:15:32 -0700 |
commit | 9967a2276db4a126963554e259c210e16b4c2934 (patch) | |
tree | c223d9350227ce364fe7bcd6d3bef4855c97e1ec | |
parent | f9c03dfd292913d4d6d1560911ce8b58ab29f22e (diff) | |
download | meson-9967a2276db4a126963554e259c210e16b4c2934.zip meson-9967a2276db4a126963554e259c210e16b4c2934.tar.gz meson-9967a2276db4a126963554e259c210e16b4c2934.tar.bz2 |
ninja: Expose response file rules in compdb
Possibly this should now be done by marking rules as being wanted in compdb, rather
than listing the rule names...
-rw-r--r-- | mesonbuild/backend/ninjabackend.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index b9378b8..6a8a2ec 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -399,10 +399,14 @@ int dummy; # http://clang.llvm.org/docs/JSONCompilationDatabase.html def generate_compdb(self): rules = [] + # TODO: Rather than an explicit list here, rules could be marked in the + # rule store as being wanted in compdb for for_machine in MachineChoice: for lang in self.environment.coredata.compilers[for_machine]: - rules += [self.get_compiler_rule_name(lang, for_machine)] - rules += [self.get_pch_rule_name(lang, for_machine)] + rules += [ "%s%s" % (rule, ext) for rule in [self.get_compiler_rule_name(lang, for_machine)] + for ext in ['', '_RSP']] + rules += [ "%s%s" % (rule, ext) for rule in [self.get_pch_rule_name(lang, for_machine)] + for ext in ['', '_RSP']] compdb_options = ['-x'] if mesonlib.version_compare(self.ninja_version, '>=1.9') else [] ninja_compdb = [self.ninja_command, '-t', 'compdb'] + compdb_options + rules builddir = self.environment.get_build_dir() |