This PR adds --enable-wleveldb
option to the configure
script.
Here are some examples of usefulness:
Related to #14920.
Inspired by practicalswift and promag.
1680@@ -1667,6 +1681,7 @@ echo " sanitizers = $use_sanitizers"
1681 echo " debug enabled = $enable_debug"
1682 echo " gprof enabled = $enable_gprof"
1683 echo " werror = $enable_werror"
1684+echo " wleveldb = $enable_wleveldb"
wleveldb
is significant enough to be part of the default configure
output.
-0 on this.
Can you give examples of what’s actually being hidden?
Have the changes been made upstream to “fix” the warnings, rather than just hiding them here?
It seems a bit overkill that we’d add an on-by-default flag to configure to hide a couple warnings from leveldb.
As linked in other PRs, @theuni’s comment from a while back:
I’m really not a fan of disabling warnings for 3rd party headers, but I’m not completely opposed. I’m more afraid that this will be one of those changes that causes lots of subtle future grief due to edge-cases in libtool, automake, ccache, non-glibc builds, dependency generation (gcc’s “-M*” options), etc.
Clang has the “system-header-prefix” option, which could be hooked up to depends with just a few lines. It doesn’t seem to exist in GCC yet, but I’d be happy to add and upstream that feature.
Thoughts on that approach?
@fanquake Thank you for your review.
IIUC, @theuni concerns about -isystem
approach. This PR is an alternative.
It seems a bit overkill that we’d add an on-by-default flag to configure to hide a couple warnings from leveldb.
There are much more warnings in #15822, #16387, #16710 ;) This PR is a step to implement building with -Werror=suggest-override
.
Have the changes been made upstream to “fix” the warnings, rather than just hiding them here?
IMHO, it is not safe to update leveldb subtree just to “fix” warnings. This PR suggests a more conservative approach to removing noise from a build log.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
Thank you for your review. Your comment has been addressed. @laanwj #16710 (comment)
and if you really want to have a different warning level for built-in dependencies, maybe make it general and cover secp256k1 too?
I thought about it. Configuring of leveldb
and secp256k1
subtrees are different. The latter uses AC_CONFIG_SUBDIRS
macro. So, let this PR be limited with leveldb
subtree scope.
I thought about it. Configuring of leveldb and secp256k1 subtrees are different.
That’s fine, but again, I just don’t like adding a configure argument that only covers disable warnings for leveldb. It is so small in scope it seems silly to have a configure argument.
This commit adds "--enable-wleveldb" option to the configure script.
configure.ac
, instead of a blanket ‘disable warnings for leveldb’ opton. It seems like either flying blind or being overwhelmed with spammy warnings.