Skip to content

Commit

Permalink
build: Bump minimum supported Clang to clang-13
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoFalke committed Oct 24, 2023
1 parent fab1ef9 commit fae379b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11 deletions.
6 changes: 3 additions & 3 deletions ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ export LC_ALL=C.UTF-8

export CONTAINER_NAME=ci_native_nowallet_libbitcoinkernel
export CI_IMAGE_NAME_TAG="docker.io/debian:bullseye"
# Use minimum supported python3.9 and clang-10 (or best-effort clang-11), see doc/dependencies.md
export PACKAGES="python3-zmq clang-11 llvm-11 libc++abi-11-dev libc++-11-dev"
export DEP_OPTS="NO_WALLET=1 CC=clang-11 CXX='clang++-11 -stdlib=libc++'"
# Use minimum supported python3.9 and clang-13, see doc/dependencies.md
export PACKAGES="python3-zmq clang-13 llvm-13 libc++abi-13-dev libc++-13-dev"
export DEP_OPTS="NO_WALLET=1 CC=clang-13 CXX='clang++-13 -stdlib=libc++'"
export GOAL="install"
export BITCOIN_CONFIG="--enable-reduce-exports --enable-experimental-util-chainstate --with-experimental-kernel-lib --enable-shared"
2 changes: 1 addition & 1 deletion doc/dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ You can find installation instructions in the `build-*.md` file for your platfor
| --- | --- |
| [Autoconf](https://www.gnu.org/software/autoconf/) | [2.69](https://github.com/bitcoin/bitcoin/pull/17769) |
| [Automake](https://www.gnu.org/software/automake/) | [1.13](https://github.com/bitcoin/bitcoin/pull/18290) |
| [Clang](https://clang.llvm.org) | [10.0](https://github.com/bitcoin/bitcoin/pull/27682) |
| [Clang](https://clang.llvm.org) | [13.0](https://github.com/bitcoin/bitcoin/pull/28210) |
| [GCC](https://gcc.gnu.org) | [9.1](https://github.com/bitcoin/bitcoin/pull/27662) |
| [Python](https://www.python.org) (scripts, tests) | [3.9](https://github.com/bitcoin/bitcoin/pull/28211) |
| [systemtap](https://sourceware.org/systemtap/) ([tracing](tracing.md))| N/A |
Expand Down
3 changes: 1 addition & 2 deletions src/addrdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,7 @@ util::Result<std::unique_ptr<AddrMan>> LoadAddrman(const NetGroupManager& netgro
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."),
e.what(), PACKAGE_BUGREPORT, fs::quoted(fs::PathToString(path_addr)))};
}
return {std::move(addrman)}; // std::move should be unnecessary but is temporarily needed to work around clang bug
// (https://github.com/bitcoin/bitcoin/pull/25977#issuecomment-1561270092)
return addrman;
}

void DumpAnchors(const fs::path& anchors_db_path, const std::vector<CAddress>& anchors)
Expand Down
2 changes: 1 addition & 1 deletion src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1415,7 +1415,7 @@ std::optional<std::string> V2Transport::GetMessageType(Span<const uint8_t>& cont
}
// Strip message type bytes of contents.
contents = contents.subspan(CMessageHeader::COMMAND_SIZE);
return {std::move(ret)};
return ret;
}

CNetMessage V2Transport::GetReceivedMessage(std::chrono::microseconds time, bool& reject_message) noexcept
Expand Down
8 changes: 4 additions & 4 deletions src/wallet/interfaces.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ class WalletLoaderImpl : public WalletLoader
bilingual_str error;
std::unique_ptr<Wallet> wallet{MakeWallet(m_context, CreateWallet(m_context, name, /*load_on_start=*/true, options, status, error, warnings))};
if (wallet) {
return {std::move(wallet)};
return wallet;
} else {
return util::Error{error};
}
Expand All @@ -616,7 +616,7 @@ class WalletLoaderImpl : public WalletLoader
bilingual_str error;
std::unique_ptr<Wallet> wallet{MakeWallet(m_context, LoadWallet(m_context, name, /*load_on_start=*/true, options, status, error, warnings))};
if (wallet) {
return {std::move(wallet)};
return wallet;
} else {
return util::Error{error};
}
Expand All @@ -627,7 +627,7 @@ class WalletLoaderImpl : public WalletLoader
bilingual_str error;
std::unique_ptr<Wallet> wallet{MakeWallet(m_context, RestoreWallet(m_context, backup_file, wallet_name, /*load_on_start=*/true, status, error, warnings))};
if (wallet) {
return {std::move(wallet)};
return wallet;
} else {
return util::Error{error};
}
Expand All @@ -642,7 +642,7 @@ class WalletLoaderImpl : public WalletLoader
.solvables_wallet_name = res->solvables_wallet ? std::make_optional(res->solvables_wallet->GetName()) : std::nullopt,
.backup_path = res->backup_path,
};
return {std::move(out)}; // std::move to work around clang bug
return out;
}
std::string getWalletDir() override
{
Expand Down

0 comments on commit fae379b

Please sign in to comment.