Skip to content

Commit 14a67ee

Browse files
MarcoFalkeknst
authored andcommitted
Merge bitcoin#20182: ci: Build with --enable-werror by default, and document exceptions
2f6fe4e ci: Build with --enable-werror by default, and document exceptions (Hennadii Stepanov) Pull request description: This PR prevents introducing of new compiler warnings in the master branch, e.g., bitcoin#19986, bitcoin#20162. ACKs for top commit: practicalswift: cr ACK 2f6fe4e: patch looks correct MarcoFalke: re-ACK 2f6fe4e 🏏 vasild: ACK 2f6fe4e Tree-SHA512: 23b5feb5bc472658c992d882ef61af23496f25adaa19f9c79bfaef5d2db273d44981aa93b1631a7d37cb58755283c1dacf3f2d68e501522d3fa8c965ab646d19
1 parent 4da2067 commit 14a67ee

File tree

6 files changed

+11
-4
lines changed

6 files changed

+11
-4
lines changed

ci/dash/build_src.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ if [ -n "$CONFIG_SHELL" ]; then
3838
fi
3939

4040
BITCOIN_CONFIG_ALL="--enable-suppress-external-warnings --disable-dependency-tracking --prefix=$DEPENDS_DIR/$HOST --bindir=$BASE_OUTDIR/bin --libdir=$BASE_OUTDIR/lib"
41+
if [ -z "$NO_WERROR" ]; then
42+
BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} --enable-werror"
43+
fi
4144

4245
( test -n "$CONFIG_SHELL" && eval '"$CONFIG_SHELL" -c "./autogen.sh"' ) || ./autogen.sh
4346

ci/test/00_setup_env_arm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ export RUN_FUNCTIONAL_TESTS=false
2525
export GOAL="install"
2626
# -Wno-psabi is to disable ABI warnings: "note: parameter passing for argument of type ... changed in GCC 7.1"
2727
# This could be removed once the ABI change warning does not show up by default
28-
export BITCOIN_CONFIG="--enable-reduce-exports --enable-suppress-external-warnings --enable-werror CXXFLAGS=-Wno-psabi --with-boost-process"
28+
export BITCOIN_CONFIG="--enable-reduce-exports --enable-suppress-external-warnings CXXFLAGS=-Wno-psabi --with-boost-process"

ci/test/00_setup_env_mac.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ export XCODE_BUILD_ID=12B45b
1414
export RUN_UNIT_TESTS=false
1515
export RUN_FUNCTIONAL_TESTS=false
1616
export GOAL="all deploy"
17-
export BITCOIN_CONFIG="--with-gui --enable-reduce-exports --disable-miner --enable-werror --with-boost-process"
17+
export BITCOIN_CONFIG="--with-gui --enable-reduce-exports --disable-miner --with-boost-process"

ci/test/00_setup_env_mac_host.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export CONTAINER_NAME=ci_macos
1010
export HOST=x86_64-apple-darwin
1111
export PIP_PACKAGES="zmq lief"
1212
export GOAL="install"
13-
export BITCOIN_CONFIG="--with-gui --enable-reduce-exports --disable-miner --enable-werror --with-boost-process"
13+
export BITCOIN_CONFIG="--with-gui --enable-reduce-exports --disable-miner --with-boost-process"
1414
export CI_OS_NAME="macos"
1515
export NO_DEPENDS=1
1616
export OSX_SDK=""

ci/test/00_setup_env_native_cxx20.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ export CPPFLAGS="-DDEBUG_LOCKORDER -DENABLE_DASH_DEBUG -DARENA_DEBUG"
1313
export PYZMQ=true
1414
export RUN_FUNCTIONAL_TESTS=false
1515
export GOAL="install"
16-
export BITCOIN_CONFIG="--enable-zmq --enable-reduce-exports --enable-crash-hooks --enable-c++20 --enable-werror"
16+
export BITCOIN_CONFIG="--enable-zmq --enable-reduce-exports --enable-crash-hooks --enable-c++20"
1717

ci/test/00_setup_env_win64.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,7 @@ export RUN_SECURITY_TESTS="false"
1515
export GOAL="deploy"
1616
export BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --disable-miner --without-boost-process"
1717
export DIRECT_WINE_EXEC_TESTS=true
18+
19+
# Compiler for MinGW-w64 causes false -Wreturn-type warning.
20+
# See https://sourceforge.net/p/mingw-w64/bugs/306/
21+
export NO_WERROR=1

0 commit comments

Comments
 (0)