diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-03-21 20:28:26 -0400 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2022-03-23 15:46:01 +0530 |
commit | 7b78c6b41b5fcf0ae43e56aed289edbcc546823a (patch) | |
tree | c0167d1b89e8cea9af77a7fc7060e3f399c515ca /mesonbuild/backend/ninjabackend.py | |
parent | 90fba4251157c71b81bd91be7cf3246d85c85338 (diff) | |
download | meson-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
Diffstat (limited to 'mesonbuild/backend/ninjabackend.py')
-rw-r--r-- | mesonbuild/backend/ninjabackend.py | 2 |
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. |