Skip to content

Commit ba0313d

Browse files
committed
Merge bitcoin#28210: build: Bump clang minimum supported version to 13
fae379b build: Bump minimum supported Clang to clang-13 (MarcoFalke) fab1ef9 Bump .python-version from 3.9.17 to 3.9.18 (MarcoFalke) Pull request description: All supported operating systems ship with clang-13 (or later), so bump the minimum to that and remove now unused workarounds for previous clang bugs. For reference: * https://packages.debian.org/bullseye/clang-13 * https://packages.ubuntu.com/jammy/clang (`clang-14`) and https://packages.ubuntu.com/jammy/clang-15 * CentOS-like 8/9 Stream: All Clang versions from 13 to 15 * FreeBSD 12/13: All Clang version from 13 to 16 * OpenSuse Tumbleweed ships with https://software.opensuse.org/package/clang (`clang16`); No idea about OpenSuse Leap This is for Bitcoin Core 27.0 in 2024 (next year), not the soon upcoming 26.0 next month. ACKs for top commit: fanquake: ACK fae379b Tree-SHA512: 8ed2b227de39b60d3f004daa4a38ea66fe005988bd977046a40613fba847d88d272925732f24777c00264abb99e25874b05b4b9243868d304eba84b450835ccc
2 parents 4370482 + fae379b commit ba0313d

File tree

6 files changed

+11
-12
lines changed

6 files changed

+11
-12
lines changed

.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.9.17
1+
3.9.18

ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh

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

99
export CONTAINER_NAME=ci_native_nowallet_libbitcoinkernel
1010
export CI_IMAGE_NAME_TAG="docker.io/debian:bullseye"
11-
# Use minimum supported python3.9 and clang-10 (or best-effort clang-11), see doc/dependencies.md
12-
export PACKAGES="python3-zmq clang-11 llvm-11 libc++abi-11-dev libc++-11-dev"
13-
export DEP_OPTS="NO_WALLET=1 CC=clang-11 CXX='clang++-11 -stdlib=libc++'"
11+
# Use minimum supported python3.9 and clang-13, see doc/dependencies.md
12+
export PACKAGES="python3-zmq clang-13 llvm-13 libc++abi-13-dev libc++-13-dev"
13+
export DEP_OPTS="NO_WALLET=1 CC=clang-13 CXX='clang++-13 -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) | [10.0](https://github.com/bitcoin/bitcoin/pull/27682) |
11+
| [Clang](https://clang.llvm.org) | [13.0](https://github.com/bitcoin/bitcoin/pull/28210) |
1212
| [GCC](https://gcc.gnu.org) | [9.1](https://github.com/bitcoin/bitcoin/pull/27662) |
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 |

src/addrdb.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,7 @@ util::Result<std::unique_ptr<AddrMan>> LoadAddrman(const NetGroupManager& netgro
209209
return util::Error{strprintf(_("Invalid or corrupt peers.dat (%s). If you believe this is a bug, please report it to %s. As a workaround, you can move the file (%s) out of the way (rename, move, or delete) to have a new one created on the next start."),
210210
e.what(), PACKAGE_BUGREPORT, fs::quoted(fs::PathToString(path_addr)))};
211211
}
212-
return {std::move(addrman)}; // std::move should be unnecessary but is temporarily needed to work around clang bug
213-
// (https://github.com/bitcoin/bitcoin/pull/25977#issuecomment-1561270092)
212+
return addrman;
214213
}
215214

216215
void DumpAnchors(const fs::path& anchors_db_path, const std::vector<CAddress>& anchors)

src/net.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1415,7 +1415,7 @@ std::optional<std::string> V2Transport::GetMessageType(Span<const uint8_t>& cont
14151415
}
14161416
// Strip message type bytes of contents.
14171417
contents = contents.subspan(CMessageHeader::COMMAND_SIZE);
1418-
return {std::move(ret)};
1418+
return ret;
14191419
}
14201420

14211421
CNetMessage V2Transport::GetReceivedMessage(std::chrono::microseconds time, bool& reject_message) noexcept

src/wallet/interfaces.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ class WalletLoaderImpl : public WalletLoader
602602
bilingual_str error;
603603
std::unique_ptr<Wallet> wallet{MakeWallet(m_context, CreateWallet(m_context, name, /*load_on_start=*/true, options, status, error, warnings))};
604604
if (wallet) {
605-
return {std::move(wallet)};
605+
return wallet;
606606
} else {
607607
return util::Error{error};
608608
}
@@ -616,7 +616,7 @@ class WalletLoaderImpl : public WalletLoader
616616
bilingual_str error;
617617
std::unique_ptr<Wallet> wallet{MakeWallet(m_context, LoadWallet(m_context, name, /*load_on_start=*/true, options, status, error, warnings))};
618618
if (wallet) {
619-
return {std::move(wallet)};
619+
return wallet;
620620
} else {
621621
return util::Error{error};
622622
}
@@ -627,7 +627,7 @@ class WalletLoaderImpl : public WalletLoader
627627
bilingual_str error;
628628
std::unique_ptr<Wallet> wallet{MakeWallet(m_context, RestoreWallet(m_context, backup_file, wallet_name, /*load_on_start=*/true, status, error, warnings))};
629629
if (wallet) {
630-
return {std::move(wallet)};
630+
return wallet;
631631
} else {
632632
return util::Error{error};
633633
}
@@ -642,7 +642,7 @@ class WalletLoaderImpl : public WalletLoader
642642
.solvables_wallet_name = res->solvables_wallet ? std::make_optional(res->solvables_wallet->GetName()) : std::nullopt,
643643
.backup_path = res->backup_path,
644644
};
645-
return {std::move(out)}; // std::move to work around clang bug
645+
return out;
646646
}
647647
std::string getWalletDir() override
648648
{

0 commit comments

Comments
 (0)