mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-06 03:02:37 +02:00
Merge bitcoin/bitcoin#33861: build: Bump VS minimum supported version to 18.3
452c743951refactor: Remove workaround for resolved MSVC bug (Hennadii Stepanov)7164a0cab6build: Bump VS minimum supported version to 18.3 (Hennadii Stepanov) Pull request description: The new [VS 18.0](https://learn.microsoft.com/en-us/visualstudio/releases/2026/release-notes) release includes numerous bug fixes. Bumped to v18.3.0 where [this](https://github.com/microsoft/vcpkg/issues/22074) bug in the builtin vcpkg is [fixed](https://github.com/microsoft/vcpkg/issues/22074#issuecomment-3880320585). ACKs for top commit: maflcko: review ACK452c743951🍳 hodlinator: crACK452c743951janb84: ACK452c743951Tree-SHA512: a8f859d11d4cf0440cf7ff8353fd1babe90818356ef02eae28571a2a4a7960db1f85cdbc4f88b5fb8a1f8bf44bca8c8715cdfb9ea87997c3fcd81866cd0b156d
This commit is contained in:
2
.github/ci-windows.py
vendored
2
.github/ci-windows.py
vendored
@@ -45,7 +45,7 @@ def generate(ci_type):
|
||||
"build",
|
||||
"-Werror=dev",
|
||||
"--preset",
|
||||
"vs2022",
|
||||
"vs2026",
|
||||
] + GENERATE_OPTIONS[ci_type]
|
||||
run(command)
|
||||
|
||||
|
||||
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@@ -204,7 +204,7 @@ jobs:
|
||||
|
||||
windows-native-dll:
|
||||
name: ${{ matrix.job-name }}
|
||||
runs-on: windows-2022
|
||||
runs-on: windows-2025-vs2026
|
||||
|
||||
if: ${{ vars.SKIP_BRANCH_PUSH != 'true' || github.event_name == 'pull_request' }}
|
||||
|
||||
@@ -218,9 +218,9 @@ jobs:
|
||||
job-type: [standard, fuzz]
|
||||
include:
|
||||
- job-type: standard
|
||||
job-name: 'Windows native, VS 2022'
|
||||
job-name: 'Windows native, VS'
|
||||
- job-type: fuzz
|
||||
job-name: 'Windows native, fuzz, VS 2022'
|
||||
job-name: 'Windows native, fuzz, VS'
|
||||
|
||||
steps:
|
||||
- *ANNOTATION_PR_NUMBER
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
"version": 3,
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "vs2022",
|
||||
"displayName": "Build using 'Visual Studio 17 2022' generator and 'x64-windows' triplet",
|
||||
"name": "vs2026",
|
||||
"displayName": "Build using 'Visual Studio 18 2026' generator and 'x64-windows' triplet",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
},
|
||||
"generator": "Visual Studio 17 2022",
|
||||
"generator": "Visual Studio 18 2026",
|
||||
"architecture": "x64",
|
||||
"toolchainFile": "$env{VCPKG_ROOT}\\scripts\\buildsystems\\vcpkg.cmake",
|
||||
"cacheVariables": {
|
||||
@@ -19,14 +19,14 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "vs2022-static",
|
||||
"displayName": "Build using 'Visual Studio 17 2022' generator and 'x64-windows-static' triplet",
|
||||
"name": "vs2026-static",
|
||||
"displayName": "Build using 'Visual Studio 18 2026' generator and 'x64-windows-static' triplet",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
},
|
||||
"generator": "Visual Studio 17 2022",
|
||||
"generator": "Visual Studio 18 2026",
|
||||
"architecture": "x64",
|
||||
"toolchainFile": "$env{VCPKG_ROOT}\\scripts\\buildsystems\\vcpkg.cmake",
|
||||
"cacheVariables": {
|
||||
|
||||
@@ -10,11 +10,11 @@ For cross-compiling options, please see [`build-windows.md`](./build-windows.md)
|
||||
|
||||
This guide relies on using CMake and vcpkg package manager provided with the Visual Studio installation.
|
||||
Here are requirements for the Visual Studio installation:
|
||||
1. Minimum required version: Visual Studio 2022 version 17.13.
|
||||
1. Minimum required version: Visual Studio 2026 version 18.3.
|
||||
2. Installed components:
|
||||
- The "Desktop development with C++" workload.
|
||||
|
||||
The commands in this guide should be executed in "Developer PowerShell for VS 2022" or "Developer Command Prompt for VS 2022".
|
||||
The commands in this guide should be executed in "Developer PowerShell for VS" or "Developer Command Prompt for VS".
|
||||
The former is assumed hereinafter.
|
||||
|
||||
### 2. Git
|
||||
@@ -54,8 +54,8 @@ Run `cmake -B build -LH` to see the full list of available options.
|
||||
|
||||
### 4. Building with Static Linking with GUI
|
||||
|
||||
```
|
||||
cmake -B build --preset vs2022-static # It might take a while if the vcpkg binary cache is unpopulated or invalidated.
|
||||
```powershell
|
||||
cmake -B build --preset vs2026-static # It might take a while if the vcpkg binary cache is unpopulated or invalidated.
|
||||
cmake --build build --config Release # Append "-j N" for N parallel jobs.
|
||||
ctest --test-dir build --build-config Release # Append "-j N" for N parallel tests.
|
||||
cmake --install build --config Release # Optional.
|
||||
@@ -63,8 +63,8 @@ cmake --install build --config Release # Optional.
|
||||
|
||||
### 5. Building with Dynamic Linking without GUI
|
||||
|
||||
```
|
||||
cmake -B build --preset vs2022 -DBUILD_GUI=OFF # It might take a while if the vcpkg binary cache is unpopulated or invalidated.
|
||||
```powershell
|
||||
cmake -B build --preset vs2026 -DBUILD_GUI=OFF # It might take a while if the vcpkg binary cache is unpopulated or invalidated.
|
||||
cmake --build build --config Release # Append "-j N" for N parallel jobs.
|
||||
ctest --test-dir build --build-config Release # Append "-j N" for N parallel tests.
|
||||
```
|
||||
@@ -79,7 +79,7 @@ specify a shorter path to store intermediate build files by using
|
||||
the [`--x-buildtrees-root`](https://learn.microsoft.com/en-us/vcpkg/commands/common-options#buildtrees-root) option:
|
||||
|
||||
```powershell
|
||||
cmake -B build --preset vs2022-static -DVCPKG_INSTALL_OPTIONS="--x-buildtrees-root=C:\vcpkg"
|
||||
cmake -B build --preset vs2026-static -DVCPKG_INSTALL_OPTIONS="--x-buildtrees-root=C:\vcpkg"
|
||||
```
|
||||
|
||||
If vcpkg installation fails with the message "Paths with embedded space may be handled incorrectly", which
|
||||
@@ -87,17 +87,17 @@ can occur if your local Bitcoin Core repository path contains spaces, you can ov
|
||||
by setting the [`VCPKG_INSTALLED_DIR`](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/users/buildsystems/cmake-integration.md#vcpkg_installed_dir) variable:
|
||||
|
||||
```powershell
|
||||
cmake -B build --preset vs2022-static -DVCPKG_INSTALLED_DIR="C:\path_without_spaces"
|
||||
cmake -B build --preset vs2026-static -DVCPKG_INSTALLED_DIR="C:\path_without_spaces"
|
||||
```
|
||||
|
||||
## Performance Notes
|
||||
|
||||
### 7. vcpkg Manifest Default Features
|
||||
|
||||
One can skip vcpkg manifest default features to speedup the configuration step.
|
||||
One can skip vcpkg manifest default features to speed up the configuration step.
|
||||
For example, the following invocation will skip all features except for "wallet" and "tests" and their dependencies:
|
||||
```
|
||||
cmake -B build --preset vs2022 -DVCPKG_MANIFEST_NO_DEFAULT_FEATURES=ON -DVCPKG_MANIFEST_FEATURES="wallet;tests" -DBUILD_GUI=OFF -DWITH_ZMQ=OFF
|
||||
cmake -B build --preset vs2026 -DVCPKG_MANIFEST_NO_DEFAULT_FEATURES=ON -DVCPKG_MANIFEST_FEATURES="wallet;tests" -DBUILD_GUI=OFF -DWITH_ZMQ=OFF
|
||||
```
|
||||
|
||||
Available features are listed in the [`vcpkg.json`](/vcpkg.json) file.
|
||||
|
||||
@@ -33,15 +33,6 @@
|
||||
|
||||
using namespace util::hex_literals;
|
||||
|
||||
// Workaround MSVC bug triggering C7595 when calling consteval constructors in
|
||||
// initializer lists.
|
||||
// https://developercommunity.visualstudio.com/t/Bogus-C7595-error-on-valid-C20-code/10906093
|
||||
#if defined(_MSC_VER)
|
||||
auto consteval_ctor(auto&& input) { return input; }
|
||||
#else
|
||||
#define consteval_ctor(input) (input)
|
||||
#endif
|
||||
|
||||
static CBlock CreateGenesisBlock(const char* pszTimestamp, const CScript& genesisOutputScript, uint32_t nTime, uint32_t nNonce, uint32_t nBits, int32_t nVersion, const CAmount& genesisReward)
|
||||
{
|
||||
CMutableTransaction txNew;
|
||||
@@ -177,19 +168,19 @@ public:
|
||||
.height = 840'000,
|
||||
.hash_serialized = AssumeutxoHash{uint256{"a2a5521b1b5ab65f67818e5e8eccabb7171a517f9e2382208f77687310768f96"}},
|
||||
.m_chain_tx_count = 991032194,
|
||||
.blockhash = consteval_ctor(uint256{"0000000000000000000320283a032748cef8227873ff4872689bf23f1cda83a5"}),
|
||||
.blockhash = uint256{"0000000000000000000320283a032748cef8227873ff4872689bf23f1cda83a5"},
|
||||
},
|
||||
{
|
||||
.height = 880'000,
|
||||
.hash_serialized = AssumeutxoHash{uint256{"dbd190983eaf433ef7c15f78a278ae42c00ef52e0fd2a54953782175fbadcea9"}},
|
||||
.m_chain_tx_count = 1145604538,
|
||||
.blockhash = consteval_ctor(uint256{"000000000000000000010b17283c3c400507969a9c2afd1dcf2082ec5cca2880"}),
|
||||
.blockhash = uint256{"000000000000000000010b17283c3c400507969a9c2afd1dcf2082ec5cca2880"},
|
||||
},
|
||||
{
|
||||
.height = 910'000,
|
||||
.hash_serialized = AssumeutxoHash{uint256{"4daf8a17b4902498c5787966a2b51c613acdab5df5db73f196fa59a4da2f1568"}},
|
||||
.m_chain_tx_count = 1226586151,
|
||||
.blockhash = consteval_ctor(uint256{"0000000000000000000108970acb9522ffd516eae17acddcb1bd16469194a821"}),
|
||||
.blockhash = uint256{"0000000000000000000108970acb9522ffd516eae17acddcb1bd16469194a821"},
|
||||
}
|
||||
};
|
||||
|
||||
@@ -292,7 +283,7 @@ public:
|
||||
.height = 2'500'000,
|
||||
.hash_serialized = AssumeutxoHash{uint256{"f841584909f68e47897952345234e37fcd9128cd818f41ee6c3ca68db8071be7"}},
|
||||
.m_chain_tx_count = 66484552,
|
||||
.blockhash = consteval_ctor(uint256{"0000000000000093bcb68c03a9a168ae252572d348a2eaeba2cdf9231d73206f"}),
|
||||
.blockhash = uint256{"0000000000000093bcb68c03a9a168ae252572d348a2eaeba2cdf9231d73206f"},
|
||||
}
|
||||
};
|
||||
|
||||
@@ -399,7 +390,7 @@ public:
|
||||
.height = 90'000,
|
||||
.hash_serialized = AssumeutxoHash{uint256{"784fb5e98241de66fdd429f4392155c9e7db5c017148e66e8fdbc95746f8b9b5"}},
|
||||
.m_chain_tx_count = 11347043,
|
||||
.blockhash = consteval_ctor(uint256{"0000000002ebe8bcda020e0dd6ccfbdfac531d2f6a81457191b99fc2df2dbe3b"}),
|
||||
.blockhash = uint256{"0000000002ebe8bcda020e0dd6ccfbdfac531d2f6a81457191b99fc2df2dbe3b"},
|
||||
}
|
||||
};
|
||||
|
||||
@@ -514,7 +505,7 @@ public:
|
||||
.height = 160'000,
|
||||
.hash_serialized = AssumeutxoHash{uint256{"fe0a44309b74d6b5883d246cb419c6221bcccf0b308c9b59b7d70783dbdf928a"}},
|
||||
.m_chain_tx_count = 2289496,
|
||||
.blockhash = consteval_ctor(uint256{"0000003ca3c99aff040f2563c2ad8f8ec88bd0fd6b8f0895cfaf1ef90353a62c"}),
|
||||
.blockhash = uint256{"0000003ca3c99aff040f2563c2ad8f8ec88bd0fd6b8f0895cfaf1ef90353a62c"},
|
||||
}
|
||||
};
|
||||
|
||||
@@ -633,21 +624,21 @@ public:
|
||||
.height = 110,
|
||||
.hash_serialized = AssumeutxoHash{uint256{"b952555c8ab81fec46f3d4253b7af256d766ceb39fb7752b9d18cdf4a0141327"}},
|
||||
.m_chain_tx_count = 111,
|
||||
.blockhash = consteval_ctor(uint256{"6affe030b7965ab538f820a56ef56c8149b7dc1d1c144af57113be080db7c397"}),
|
||||
.blockhash = uint256{"6affe030b7965ab538f820a56ef56c8149b7dc1d1c144af57113be080db7c397"},
|
||||
},
|
||||
{
|
||||
// For use by fuzz target src/test/fuzz/utxo_snapshot.cpp
|
||||
.height = 200,
|
||||
.hash_serialized = AssumeutxoHash{uint256{"17dcc016d188d16068907cdeb38b75691a118d43053b8cd6a25969419381d13a"}},
|
||||
.m_chain_tx_count = 201,
|
||||
.blockhash = consteval_ctor(uint256{"385901ccbd69dff6bbd00065d01fb8a9e464dede7cfe0372443884f9b1dcf6b9"}),
|
||||
.blockhash = uint256{"385901ccbd69dff6bbd00065d01fb8a9e464dede7cfe0372443884f9b1dcf6b9"},
|
||||
},
|
||||
{
|
||||
// For use by test/functional/feature_assumeutxo.py and test/functional/tool_bitcoin_chainstate.py
|
||||
.height = 299,
|
||||
.hash_serialized = AssumeutxoHash{uint256{"d2b051ff5e8eef46520350776f4100dd710a63447a8e01d917e92e79751a63e2"}},
|
||||
.m_chain_tx_count = 334,
|
||||
.blockhash = consteval_ctor(uint256{"7cc695046fec709f8c9394b6f928f81e81fd3ac20977bb68760fa1faa7916ea2"}),
|
||||
.blockhash = uint256{"7cc695046fec709f8c9394b6f928f81e81fd3ac20977bb68760fa1faa7916ea2"},
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user