aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-03-21 20:28:26 -0400
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2022-03-23 15:46:01 +0530
commit7b78c6b41b5fcf0ae43e56aed289edbcc546823a (patch)
treec0167d1b89e8cea9af77a7fc7060e3f399c515ca
parent90fba4251157c71b81bd91be7cf3246d85c85338 (diff)
downloadmeson-7b78c6b41b5fcf0ae43e56aed289edbcc546823a.zip
meson-7b78c6b41b5fcf0ae43e56aed289edbcc546823a.tar.gz
meson-7b78c6b41b5fcf0ae43e56aed289edbcc546823a.tar.bz2
ninja backend: do not fatally error on compdb failure
We print a warning if a compilation database isn't successfully generated, which is good, because that gives some visibility in case the user really wanted to use the compdb. But warnings default to being fatal with --fatal-meson-warnings, which is not so good, because this isn't a very important warning at all, and we'd rather not error out in such cases when building works fine and a random bonus IDE feature doesn't work. Mark this particular warning as non-fatal. Fixes side issue in https://github.com/mesonbuild/wrapdb/pull/343#issuecomment-1074545609
-rw-r--r--mesonbuild/backend/ninjabackend.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index d3216b1..e0fdc93 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -606,7 +606,7 @@ class NinjaBackend(backends.Backend):
with open(os.path.join(builddir, 'compile_commands.json'), 'wb') as f:
f.write(jsondb)
except Exception:
- mlog.warning('Could not create compilation database.')
+ mlog.warning('Could not create compilation database.', fatal=False)
# Get all generated headers. Any source file might need them so
# we need to add an order dependency to them.