Skip to content

Commit 1c11089

Browse files
committed
Merge bitcoin/bitcoin#30263: build: Bump clang minimum supported version to 16
fa8f532 refactor: Remove no longer needed clang-15 workaround for std::span (MarcoFalke) 9999dbc fuzz: Clarify Apple-Clang-16 workaround (MarcoFalke) fa7462c build: Bump clang minimum supported version to 16 (MarcoFalke) Pull request description: Most supported operating systems ship with clang-16 (or later), so bump the minimum to that and allow new code to drop workarounds for previous clang bugs. For reference: * https://packages.debian.org/bookworm/clang-16 * https://packages.ubuntu.com/noble/clang (clang-18) * CentOS-like 8/9 Stream: All Clang versions from 16 to 17 * FreeBSD 12/13: All Clang versions from 16 to 18 * OpenSuse Tumbleweed ships with https://software.opensuse.org/package/clang (`clang18`); No idea about OpenSuse Leap On operating systems where the clang version is not shipped by default, the user would have to use GCC, or install clang in a different way. For example: * https://packages.debian.org/bookworm/g++ (g++-12) * https://packages.ubuntu.com/jammy/g++ (g++-11) * https://apt.llvm.org/, or nix, or guix, or compile clang from source, ... **Ubuntu 22.04 LTS does not ship with clang-16**, so one of the above workarounds is needed there. macOS 13 is unaffected, and the previous minimum requirement of Xcode15.0 remains, see also https://github.com/bitcoin/bitcoin/blame/b1ba1b178f501daa1afdd91f9efec34e5ec1e294/.github/workflows/ci.yml#L93. For macOS 11 (Big Sur) and 12 (Monterey) you need to install a more recent version of llvm, this remains unchanged as well, see https://github.com/bitcoin/bitcoin/blame/b1ba1b178f501daa1afdd91f9efec34e5ec1e294/doc/build-osx.md#L54. ACKs for top commit: hebasto: ACK fa8f532, I have reviewed the code and it looks OK. TheCharlatan: Re-ACK fa8f532 stickies-v: ACK fa8f532 Tree-SHA512: 18b79f88301a63bb5e367d2f52fffccd5fb84409061800158e51051667f6581a4cd71d4859d4cfa6d23e47e92963ab637e5ad87e3170ed23b5bebfbe99e759e2
2 parents a83f050 + fa8f532 commit 1c11089

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh

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

99
export CONTAINER_NAME=ci_native_nowallet_libbitcoinkernel
10-
export CI_IMAGE_NAME_TAG="docker.io/ubuntu:22.04"
11-
# Use minimum supported python3.9 (or best-effort 3.10) and clang-15, see doc/dependencies.md
12-
export PACKAGES="python3-zmq clang-15 llvm-15 libc++abi-15-dev libc++-15-dev"
13-
export DEP_OPTS="NO_WALLET=1 CC=clang-15 CXX='clang++-15 -stdlib=libc++'"
10+
export CI_IMAGE_NAME_TAG="docker.io/debian:bullseye"
11+
# Use minimum supported python3.9 and clang-16, see doc/dependencies.md
12+
export PACKAGES="python3-zmq clang-16 llvm-16 libc++abi-16-dev libc++-16-dev"
13+
export DEP_OPTS="NO_WALLET=1 CC=clang-16 CXX='clang++-16 -stdlib=libc++'"
1414
export GOAL="install"
1515
export BITCOIN_CONFIG="--enable-reduce-exports --enable-experimental-util-chainstate --with-experimental-kernel-lib --enable-shared"

doc/dependencies.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ You can find installation instructions in the `build-*.md` file for your platfor
88
| --- | --- |
99
| [Autoconf](https://www.gnu.org/software/autoconf/) | [2.69](https://github.com/bitcoin/bitcoin/pull/17769) |
1010
| [Automake](https://www.gnu.org/software/automake/) | [1.13](https://github.com/bitcoin/bitcoin/pull/18290) |
11-
| [Clang](https://clang.llvm.org) | [15.0](https://github.com/bitcoin/bitcoin/pull/29165) |
11+
| [Clang](https://clang.llvm.org) | [16.0](https://github.com/bitcoin/bitcoin/pull/30263) |
1212
| [GCC](https://gcc.gnu.org) | [11.1](https://github.com/bitcoin/bitcoin/pull/29091) |
1313
| [Python](https://www.python.org) (scripts, tests) | [3.9](https://github.com/bitcoin/bitcoin/pull/28211) |
1414
| [systemtap](https://sourceware.org/systemtap/) ([tracing](tracing.md))| N/A |

doc/release-notes-29091-29165.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Build
22
-----
33

4-
GCC 11.1 or later, or Clang 15+ or later,
4+
GCC 11.1 or later, or Clang 16.0 or later,
55
are now required to compile Bitcoin Core.

src/httpserver.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ class HTTPRequest
131131
*/
132132
void WriteReply(int nStatus, std::string_view reply = "")
133133
{
134-
WriteReply(nStatus, std::as_bytes(std::span{reply.data(), reply.size()}));
134+
WriteReply(nStatus, std::as_bytes(std::span{reply}));
135135
}
136136
void WriteReply(int nStatus, std::span<const std::byte> reply);
137137
};

src/test/fuzz/fuzz.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ auto& FuzzTargets()
7373

7474
void FuzzFrameworkRegisterTarget(std::string_view name, TypeTestOneInput target, FuzzTargetOptions opts)
7575
{
76-
const auto it_ins{FuzzTargets().try_emplace(name, FuzzTarget /* temporary can be dropped after clang-16 */ {std::move(target), std::move(opts)})};
77-
Assert(it_ins.second);
76+
const auto [it, ins]{FuzzTargets().try_emplace(name, FuzzTarget /* temporary can be dropped after Apple-Clang-16 ? */ {std::move(target), std::move(opts)})};
77+
Assert(ins);
7878
}
7979

8080
static std::string_view g_fuzz_target;

0 commit comments

Comments
 (0)