Skip to content

Commit e7db4e2

Browse files
author
MarcoFalke
committed
Merge bitcoin/bitcoin#24164: build: Bump minimum required clang/libc++ to 8.0
fae20e6 Revert "Avoid the use of P0083R3 std::set::merge" (MarcoFalke) fab53b5 ci/doc: Set minimum required clang/libc++ version to 8.0 (MarcoFalke) Pull request description: This is not for 23.0, but for 24.0. It comes with the following benefits: * Can use C++17 P0083R3 std::set::merge from libc++ 8.0 * No longer need to provide support for clang-7, which already fails to compile on some architectures (bitcoin/bitcoin#21294 (comment)) This should be fine, given that all supported operating systems ship with at least clang-10: * CentOS 8: clang-12 * Stretch: https://packages.debian.org/stretch/clang-11 * Buster: https://packages.debian.org/buster-backports/clang-11 * Bionic: https://packages.ubuntu.com/bionic-updates/clang-10 * Focal: https://packages.ubuntu.com/focal/clang-10 ACKs for top commit: fanquake: ACK fae20e6 - I think this is fine to do. I would be surprised if in another 6 months time someone was stuck on a system we supported, needing to compile Core, and only had access to Clang 7 or older. As mentioned in the PR description, all systems we currently support, already support multiple newer versions of Clang. hebasto: ACK fae20e6, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: 3b4c6c130ff40dd7e84934af076863415e5dd661d823c72e3e3832566c65be6e877a7ef9164bbcf394bcea4b897fc29a48db0f231c22ace0e2c9b5638659a628
2 parents c109e7d + fae20e6 commit e7db4e2

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export LC_ALL=C.UTF-8
88

99
export CONTAINER_NAME=ci_native_nowallet_libbitcoinkernel
1010
export DOCKER_NAME_TAG=ubuntu:18.04 # Use bionic to have one config run the tests in python3.6, see doc/dependencies.md
11-
export PACKAGES="python3-zmq clang-7 llvm-7 libc++abi-7-dev libc++-7-dev" # Use clang-7 to test C++17 compatibility, see doc/dependencies.md
12-
export DEP_OPTS="NO_WALLET=1 CC=clang-7 CXX='clang++-7 -stdlib=libc++'"
11+
export PACKAGES="python3-zmq clang-8 llvm-8 libc++abi-8-dev libc++-8-dev" # Use clang-8 to test C++17 compatibility, see doc/dependencies.md
12+
export DEP_OPTS="NO_WALLET=1 CC=clang-8 CXX='clang++-8 -stdlib=libc++'"
1313
export GOAL="install"
14-
export BITCOIN_CONFIG="--enable-reduce-exports CC=clang-7 CXX='clang++-7 -stdlib=libc++' --enable-experimental-util-chainstate"
14+
export BITCOIN_CONFIG="--enable-reduce-exports CC=clang-8 CXX='clang++-8 -stdlib=libc++' --enable-experimental-util-chainstate"

doc/dependencies.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ These are the dependencies currently used by Bitcoin Core. You can find instruct
77
| --- | --- | --- | --- | --- | --- |
88
| Berkeley DB | [4.8.30](https://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index.html) | 4.8.x | No | | |
99
| Boost | [1.77.0](https://www.boost.org/users/download/) | [1.64.0](https://github.com/bitcoin/bitcoin/pull/22320) | No | | |
10-
| Clang<sup>[ \* ](#note1)</sup> | | [7.0](https://releases.llvm.org/download.html) (C++17 & std::filesystem support) | | | |
10+
| Clang | | [8.0](https://releases.llvm.org/download.html) (C++17 & std::filesystem support) | | | |
1111
| Fontconfig | [2.12.6](https://www.freedesktop.org/software/fontconfig/release/) | | No | Yes | |
1212
| FreeType | [2.11.0](https://download.savannah.gnu.org/releases/freetype) | | No | | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk) (Android only) |
1313
| GCC | | [8.1](https://gcc.gnu.org/) (C++17 & std::filesystem support) | | | |
@@ -28,8 +28,6 @@ These are the dependencies currently used by Bitcoin Core. You can find instruct
2828
| ZeroMQ | [4.3.1](https://github.com/zeromq/libzmq/releases) | 4.0.0 | No | | |
2929
| zlib | | | | | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk) |
3030

31-
<a name="note1">Note \*</a> : When compiling with `-stdlib=libc++`, the minimum supported libc++ version is 7.0.
32-
3331
Controlling dependencies
3432
------------------------
3533
Some dependencies are not needed in all configurations. The following are some factors that affect the dependency list.

src/script/standard.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -398,13 +398,7 @@ void TaprootSpendData::Merge(TaprootSpendData other)
398398
merkle_root = other.merkle_root;
399399
}
400400
for (auto& [key, control_blocks] : other.scripts) {
401-
// Once P0083R3 is supported by all our targeted platforms,
402-
// this loop body can be replaced with:
403-
// scripts[key].merge(std::move(control_blocks));
404-
auto& target = scripts[key];
405-
for (auto& control_block: control_blocks) {
406-
target.insert(std::move(control_block));
407-
}
401+
scripts[key].merge(std::move(control_blocks));
408402
}
409403
}
410404

0 commit comments

Comments
 (0)