Merge bitcoin/bitcoin#27872: build: suppress external warnings by default

3b2acfcfec build: suppress external warnings by default (fanquake)

Pull request description:

  I think we are at the point where it make more sense to make this the default, than not. It's already used in the CI, and I assume most building locally are also utilising it.

ACKs for top commit:
  achow101:
    ACK 3b2acfcfec
  hebasto:
    ACK 3b2acfcfec
  stickies-v:
    ACK 3b2acfcfec

Tree-SHA512: be20203381c03dea8b5d64876c56bf8bb8defdfd6fc6d5398b71d3f28d0209c4bd1374f108df708aaa8867fda818a9bc611d1908c9fbb74f8cccdfbc5aff05af
This commit is contained in:
Andrew Chow 2023-06-15 09:52:43 -04:00
commit 9372ec71e8
No known key found for this signature in database
GPG Key ID: 17565732E08E5E41
3 changed files with 6 additions and 8 deletions

View File

@ -67,7 +67,7 @@ if [ "$DOWNLOAD_PREVIOUS_RELEASES" = "true" ]; then
test/get_previous_releases.py -b -t "$PREVIOUS_RELEASES_DIR"
fi
BITCOIN_CONFIG_ALL="--enable-suppress-external-warnings --disable-dependency-tracking"
BITCOIN_CONFIG_ALL="--disable-dependency-tracking"
if [ -z "$NO_DEPENDS" ]; then
BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} CONFIG_SITE=$DEPENDS_DIR/$HOST/share/config.site"
fi

View File

@ -244,10 +244,10 @@ dnl May be useful if warnings from external headers clutter the build output
dnl too much, so that it becomes difficult to spot Bitcoin Core warnings
dnl or if they cause a build failure with --enable-werror.
AC_ARG_ENABLE([suppress-external-warnings],
[AS_HELP_STRING([--enable-suppress-external-warnings],
[Suppress warnings from external headers (default is no)])],
[AS_HELP_STRING([--disable-suppress-external-warnings],
[Do not suppress warnings from external headers (default is to suppress)])],
[suppress_external_warnings=$enableval],
[suppress_external_warnings=no])
[suppress_external_warnings=yes])
AC_ARG_ENABLE([lcov],
[AS_HELP_STRING([--enable-lcov],

View File

@ -217,13 +217,11 @@ apt install clang-tidy bear clang
Then, pass clang as compiler to configure, and use bear to produce the `compile_commands.json`:
```sh
./autogen.sh && ./configure CC=clang CXX=clang++ --enable-suppress-external-warnings
./autogen.sh && ./configure CC=clang CXX=clang++
make clean && bear --config src/.bear-tidy-config -- make -j $(nproc)
```
The output is denoised of errors from external dependencies and includes with
`--enable-suppress-external-warnings` and `--config src/.bear-tidy-config`. Both
options may be omitted to view the full list of errors.
The output is denoised of errors from external dependencies.
To run clang-tidy on all source files: