From fdbe8b54f5d2ef0e7c1ef8fa914055c0bdbe51df Mon Sep 17 00:00:00 2001 From: Eric Voskuil Date: Tue, 10 Nov 2026 10:58:31 -0500 Subject: [PATCH 1/2] Regenerate artifacts. --- .github/workflows/ci-expanded.yml | 41 +++++- .github/workflows/ci.yml | 4 +- builds/cmake/CMakeLists.txt | 65 +++++++-- builds/cmake/CMakePresets.json | 75 +++++++++- builds/cmake/install-presets.sh | 16 +++ .../properties/{Arm64.props => ARM64.props} | 23 +++- builds/msvc/properties/Arm.props | 23 ---- builds/msvc/properties/Common.props | 94 ++++--------- builds/msvc/properties/DLL.props | 16 ++- builds/msvc/properties/Debug.props | 33 +++-- builds/msvc/properties/DebugDEXE.props | 16 ++- builds/msvc/properties/DebugDLL.props | 14 +- builds/msvc/properties/DebugLEXE.props | 12 +- builds/msvc/properties/DebugLIB.props | 18 ++- builds/msvc/properties/DebugLTCG.props | 19 ++- builds/msvc/properties/DebugSEXE.props | 12 +- builds/msvc/properties/EXE.props | 17 ++- builds/msvc/properties/LIB.props | 16 ++- builds/msvc/properties/LTCG.props | 13 -- builds/msvc/properties/Link.props | 13 +- builds/msvc/properties/Release.props | 41 +++--- builds/msvc/properties/ReleaseDEXE.props | 12 +- builds/msvc/properties/ReleaseDLL.props | 16 ++- builds/msvc/properties/ReleaseLEXE.props | 12 +- builds/msvc/properties/ReleaseLIB.props | 14 +- builds/msvc/properties/ReleaseLTCG.props | 17 ++- builds/msvc/properties/ReleaseSEXE.props | 12 +- builds/msvc/properties/Win32.props | 32 +++-- builds/msvc/properties/x64.props | 27 ++-- .../libbitcoin-database-test.props | 47 +++---- .../vs2026/libbitcoin-database.import.props | 30 ++-- .../libbitcoin-database.props | 44 +++--- .../vs2026/libbitcoin-system.import.props | 129 ++++++++++-------- 33 files changed, 579 insertions(+), 394 deletions(-) rename builds/msvc/properties/{Arm64.props => ARM64.props} (56%) delete mode 100644 builds/msvc/properties/Arm.props delete mode 100644 builds/msvc/properties/LTCG.props diff --git a/.github/workflows/ci-expanded.yml b/.github/workflows/ci-expanded.yml index 8c8bc4fa2..41abaacb4 100644 --- a/.github/workflows/ci-expanded.yml +++ b/.github/workflows/ci-expanded.yml @@ -1273,6 +1273,22 @@ jobs: coverage: "" options: "" + - image: windows-latest + preset: "win-msvc-release-shared" + cc: "" + cxx: "" + flags: "" + coverage: "" + options: "" + + - image: windows-latest + preset: "win-clangcl-release-shared" + cc: "" + cxx: "" + flags: "" + coverage: "" + options: "" + - image: ubuntu-24.04 preset: "nix-gnu-debug-shared" cc: "clang-19" @@ -1558,7 +1574,7 @@ jobs: - name: Environmental Computation shell: bash run: | - if [[ "${{ matrix.preset }}" == *shared* ]]; then + if [[ "${{ matrix.preset }}" == *shared* && "${{ matrix.image }}" != windows* ]]; then echo "LDFLAGS=-Wl,-rpath,${{ github.workspace }}/prefix/lib" >> $GITHUB_ENV fi @@ -1648,6 +1664,20 @@ jobs: tests: "*" options: "" + - image: windows-latest + configuration: "DynamicRelease" + platform: "x64" + version: "vs2026" + tests: "*" + options: "" + + - image: windows-latest + configuration: "DynamicDebug" + platform: "x64" + version: "vs2026" + tests: "*" + options: "" + - image: windows-2025-vs2026 configuration: "StaticRelease" platform: "x64" @@ -1676,6 +1706,13 @@ jobs: tests: "*" options: "--build-compiler clang" + - image: windows-latest + configuration: "DynamicRelease" + platform: "x64" + version: "vs2026" + tests: "*" + options: "--build-compiler clang" + - image: windows-11-vs2026-arm configuration: "StaticRelease" platform: "ARM64" @@ -1765,7 +1802,7 @@ jobs: working-directory: 'libbitcoin-database' run: | Write-Host "Locating test executables..." -ForegroundColor Yellow; - $BC_TEST_EXES = @(Get-ChildItem -Path "bin" -recurse | Where-Object { $_.Name -eq "libbitcoin-database-test.exe" }); + $BC_TEST_EXES = @(Get-ChildItem -Path "bin", "..\bin" -recurse -ErrorAction SilentlyContinue | Where-Object { $_.Name -eq "libbitcoin-database-test.exe" }); If ($BC_TEST_EXES.Count -ne 1) { Write-Host "Failure, invalid count of test executables." -ForegroundColor Red; exit 1; diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b71a6cd8a..52748fc4b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -639,7 +639,7 @@ jobs: - name: Environmental Computation shell: bash run: | - if [[ "${{ matrix.preset }}" == *shared* ]]; then + if [[ "${{ matrix.preset }}" == *shared* && "${{ matrix.image }}" != windows* ]]; then echo "LDFLAGS=-Wl,-rpath,${{ github.workspace }}/prefix/lib" >> $GITHUB_ENV fi @@ -818,7 +818,7 @@ jobs: working-directory: 'libbitcoin-database' run: | Write-Host "Locating test executables..." -ForegroundColor Yellow; - $BC_TEST_EXES = @(Get-ChildItem -Path "bin" -recurse | Where-Object { $_.Name -eq "libbitcoin-database-test.exe" }); + $BC_TEST_EXES = @(Get-ChildItem -Path "bin", "..\bin" -recurse -ErrorAction SilentlyContinue | Where-Object { $_.Name -eq "libbitcoin-database-test.exe" }); If ($BC_TEST_EXES.Count -ne 1) { Write-Host "Failure, invalid count of test executables." -ForegroundColor Red; exit 1; diff --git a/builds/cmake/CMakeLists.txt b/builds/cmake/CMakeLists.txt index 5382b37c2..ac2bee3a1 100644 --- a/builds/cmake/CMakeLists.txt +++ b/builds/cmake/CMakeLists.txt @@ -70,25 +70,48 @@ set( repository_root_dir "${CMAKE_CURRENT_SOURCE_DIR}/../.." ) if ( MSVC ) set( CMAKE_STATIC_LIBRARY_PREFIX "lib" ) set( CMAKE_SHARED_LIBRARY_PREFIX "lib" ) + set( CMAKE_IMPORT_LIBRARY_PREFIX "lib" ) if ( BUILD_SHARED_LIBS ) - message( FATAL_ERROR "Shared libraries are not supported with the MSVC frontend." ) + set( CMAKE_MSVC_RUNTIME_LIBRARY + "$,MultiThreadedDebugDLL,MultiThreadedDLL>" ) + else() + set( CMAKE_MSVC_RUNTIME_LIBRARY + "$,MultiThreadedDebug,MultiThreaded>" ) endif() + set( CMAKE_C_FLAGS_DEBUG "/Od /Ob1 /Oi /Gy /RTC1 /Zi" ) + set( CMAKE_CXX_FLAGS_DEBUG "/Od /Ob1 /Oi /Gy /RTC1 /Zi" ) + set( CMAKE_C_FLAGS_RELEASE "/O2 /Ob2 /Oi /Ot /Oy /GT /Qpar /Gy /GF /GS- /guard:cf- /Zi" ) + set( CMAKE_CXX_FLAGS_RELEASE "/O2 /Ob2 /Oi /Ot /Oy /GT /Qpar /Gy /GF /GS- /guard:cf- /Zi" ) + add_compile_options( /W4 - /bigobj /permissive- + /bigobj /Zc:__cplusplus /Zc:preprocessor - $<$:-Wno-unused-command-line-argument> ) + $<$:-Wno-unused-command-line-argument> + ) add_compile_definitions( UNICODE _UNICODE WIN32_LEAN_AND_MEAN NOMINMAX - _WIN32_WINNT=0x0A00 ) + _WIN32_WINNT=0x0A00 + $<$:_DEBUG> + $<$:_CRTDBG_MAP_ALLOC> + $<$:NDEBUG> + ) + + add_link_options( + /ignore:4099 + $<$:/DEBUG> + $<$:/DEBUG> + $<$:/OPT:REF> + $<$:/OPT:ICF> + ) endif() # Link POSIX threads on BSD. @@ -239,10 +262,21 @@ if ( NOT MSVC ) endif() if ( MSVC ) - target_compile_definitions( libbitcoin-database - PUBLIC - BCD_STATIC - ) + if ( BUILD_SHARED_LIBS ) + target_compile_definitions( libbitcoin-database + PRIVATE + BCD_DLL + _DLL + _WINDLL + ) + else() + target_compile_definitions( libbitcoin-database + PUBLIC + BCD_STATIC + PRIVATE + _LIB + ) + endif() endif() file( GLOB_RECURSE libbitcoin_database_HEADERS CONFIGURE_DEPENDS @@ -320,6 +354,14 @@ if ( with-tests ) --build_info=yes ) + if ( WIN32 AND BUILD_SHARED_LIBS ) + set_tests_properties( libbitcoin-database-test + PROPERTIES + ENVIRONMENT_MODIFICATION + "PATH=path_list_prepend:$,\;>" + ) + endif() + target_compile_features( libbitcoin-database-test PUBLIC cxx_std_20 @@ -343,6 +385,13 @@ if ( with-tests ) ) endif() + if ( MSVC ) + target_compile_definitions( libbitcoin-database-test + PRIVATE + _CONSOLE + ) + endif() + file( GLOB_RECURSE libbitcoin_database_test_SOURCES CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/../../test/*.c" "${CMAKE_CURRENT_SOURCE_DIR}/../../test/*.cpp" diff --git a/builds/cmake/CMakePresets.json b/builds/cmake/CMakePresets.json index a27c4649a..775629540 100644 --- a/builds/cmake/CMakePresets.json +++ b/builds/cmake/CMakePresets.json @@ -136,8 +136,7 @@ "CMAKE_INSTALL_PREFIX_PATH": { "type": "PATH", "value": "${sourceParentDir}/../../../prefix/${presetName}" - }, - "CMAKE_MSVC_RUNTIME_LIBRARY": "MultiThreaded$<$:Debug>" + } } }, { @@ -198,6 +197,30 @@ "win-base" ] }, + { + "name": "win-msvc-debug-shared", + "displayName": "Windows/MSVC/Debug/Shared", + "description": "Debug build with msvc and shared linking.", + "hidden": false, + "inherits": [ + "shared", + "win-debug", + "msvc", + "win-base" + ] + }, + { + "name": "win-msvc-release-shared", + "displayName": "Windows/MSVC/Release/Shared", + "description": "Release build with msvc and shared linking.", + "hidden": false, + "inherits": [ + "shared", + "win-release", + "msvc", + "win-base" + ] + }, { "name": "win-clangcl-debug-static", "displayName": "Windows/clang-cl/Debug/Static", @@ -221,6 +244,30 @@ "clangcl", "win-base" ] + }, + { + "name": "win-clangcl-debug-shared", + "displayName": "Windows/clang-cl/Debug/Shared", + "description": "Debug build with clang-cl and shared linking.", + "hidden": false, + "inherits": [ + "shared", + "win-debug", + "clangcl", + "win-base" + ] + }, + { + "name": "win-clangcl-release-shared", + "displayName": "Windows/clang-cl/Release/Shared", + "description": "Release build with clang-cl and shared linking.", + "hidden": false, + "inherits": [ + "shared", + "win-release", + "clangcl", + "win-base" + ] } ], "buildPresets": [ @@ -268,6 +315,18 @@ "inherits": [ "nix-target-list" ], "configurePreset": "win-msvc-release-static" }, + { + "name": "win-msvc-debug-shared", + "displayName": "Windows/MSVC/Debug/Shared", + "inherits": [ "nix-target-list" ], + "configurePreset": "win-msvc-debug-shared" + }, + { + "name": "win-msvc-release-shared", + "displayName": "Windows/MSVC/Release/Shared", + "inherits": [ "nix-target-list" ], + "configurePreset": "win-msvc-release-shared" + }, { "name": "win-clangcl-debug-static", "displayName": "Windows/clang-cl/Debug/Static", @@ -279,6 +338,18 @@ "displayName": "Windows/clang-cl/Release/Static", "inherits": [ "nix-target-list" ], "configurePreset": "win-clangcl-release-static" + }, + { + "name": "win-clangcl-debug-shared", + "displayName": "Windows/clang-cl/Debug/Shared", + "inherits": [ "nix-target-list" ], + "configurePreset": "win-clangcl-debug-shared" + }, + { + "name": "win-clangcl-release-shared", + "displayName": "Windows/clang-cl/Release/Shared", + "inherits": [ "nix-target-list" ], + "configurePreset": "win-clangcl-release-shared" } ] } diff --git a/builds/cmake/install-presets.sh b/builds/cmake/install-presets.sh index 1e151bbae..4b9ced408 100755 --- a/builds/cmake/install-presets.sh +++ b/builds/cmake/install-presets.sh @@ -225,6 +225,14 @@ main() msg_verbose "BUILD_PRESET value 'win-msvc-release-static'." BUILD_CONFIG="release" BUILD_LINK="static" + elif [[ "${BUILD_PRESET}" == "win-msvc-debug-shared" ]]; then + msg_verbose "BUILD_PRESET value 'win-msvc-debug-shared'." + BUILD_CONFIG="debug" + BUILD_LINK="dynamic" + elif [[ "${BUILD_PRESET}" == "win-msvc-release-shared" ]]; then + msg_verbose "BUILD_PRESET value 'win-msvc-release-shared'." + BUILD_CONFIG="release" + BUILD_LINK="dynamic" elif [[ "${BUILD_PRESET}" == "win-clangcl-debug-static" ]]; then msg_verbose "BUILD_PRESET value 'win-clangcl-debug-static'." BUILD_CONFIG="debug" @@ -233,6 +241,14 @@ main() msg_verbose "BUILD_PRESET value 'win-clangcl-release-static'." BUILD_CONFIG="release" BUILD_LINK="static" + elif [[ "${BUILD_PRESET}" == "win-clangcl-debug-shared" ]]; then + msg_verbose "BUILD_PRESET value 'win-clangcl-debug-shared'." + BUILD_CONFIG="debug" + BUILD_LINK="dynamic" + elif [[ "${BUILD_PRESET}" == "win-clangcl-release-shared" ]]; then + msg_verbose "BUILD_PRESET value 'win-clangcl-release-shared'." + BUILD_CONFIG="release" + BUILD_LINK="dynamic" else msg_error "Unrecognized build-preset value '${BUILD_PRESET}'." help diff --git a/builds/msvc/properties/Arm64.props b/builds/msvc/properties/ARM64.props similarity index 56% rename from builds/msvc/properties/Arm64.props rename to builds/msvc/properties/ARM64.props index c66e5e7dc..ce9185da9 100644 --- a/builds/msvc/properties/Arm64.props +++ b/builds/msvc/properties/ARM64.props @@ -1,15 +1,18 @@ - + + - + <_PropertySheetDisplayName>ARM64 Settings - + - WIN32;_WIN32;_ARM64;%(PreprocessorDefinitions) @@ -20,4 +23,10 @@ - \ No newline at end of file + + + --target=aarch64-pc-windows-msvc %(AdditionalOptions) + + + + diff --git a/builds/msvc/properties/Arm.props b/builds/msvc/properties/Arm.props deleted file mode 100644 index 53f05a3a8..000000000 --- a/builds/msvc/properties/Arm.props +++ /dev/null @@ -1,23 +0,0 @@ - - - - - <_PropertySheetDisplayName>ARM32 Settings - - - - - - WIN32;_WIN32;_ARM_;%(PreprocessorDefinitions) - - - MachineARM - - - /MACHINE:ARM %(AdditionalOptions) - - - - \ No newline at end of file diff --git a/builds/msvc/properties/Common.props b/builds/msvc/properties/Common.props index f5abe044e..5b7676a28 100644 --- a/builds/msvc/properties/Common.props +++ b/builds/msvc/properties/Common.props @@ -1,93 +1,51 @@ - + + - - <_PropertySheetDisplayName>Common Settings - Unicode - - - + + <_PropertySheetDisplayName>Common Settings + Unicode + AllRules.ruleset + false x64 - UNICODE;_UNICODE;%(PreprocessorDefinitions) - - - + UNICODE;_UNICODE;WIN32_LEAN_AND_MEAN;NOMINMAX;_WIN32_WINNT=0x0A00;%(PreprocessorDefinitions) Level4 - false - false - true - /bigobj %(AdditionalOptions) - - - - /Zc:__cplusplus /Zc:preprocessor %(AdditionalOptions) + Level4 + true + stdc11 true true false false - stdc11 - stdcpp14 - stdcpp17 - stdcpp20 - stdcpp20 - stdcpp20 - false - true - true - true - true - - - - - Level4 + false + false + true + false + /bigobj /Zc:__cplusplus /Zc:preprocessor %(AdditionalOptions) + + /ignore:4099 %(AdditionalOptions) + - - --target=i686-pc-windows-msvc %(AdditionalOptions) - --target=aarch64-pc-windows-msvc %(AdditionalOptions) - -Wno-unused-command-line-argument %(AdditionalOptions) TurnOffAllWarnings + -Wno-unused-command-line-argument %(AdditionalOptions) - - - - -msse4.1 -msha %(AdditionalOptions) - -mavx2 -msha512 %(AdditionalOptions) - -mavx512ifma -mavx512vl %(AdditionalOptions) - -mavxifma %(AdditionalOptions) - -msse4.1 -maes -mpclmul %(AdditionalOptions) - -mavx2 -maes -mpclmul -mvaes -mvpclmulqdq %(AdditionalOptions) - - - - - - - armv8-a - armv8.2-a - %(ArmExtensions)+sha2 - %(ArmExtensions)+aes - %(ArmExtensions)+sha3 - - - - - -march=%(ArmBase)%(ArmExtensions) %(AdditionalOptions) - - - - \ No newline at end of file + diff --git a/builds/msvc/properties/DLL.props b/builds/msvc/properties/DLL.props index b5aa1f07f..f53d12f93 100644 --- a/builds/msvc/properties/DLL.props +++ b/builds/msvc/properties/DLL.props @@ -1,16 +1,22 @@ - + + - + - <_PropertySheetDisplayName>Dynamic Library + <_PropertySheetDisplayName>Dynamic Library Settings dynamic .dll - + _DLL;_WINDLL;%(PreprocessorDefinitions) - \ No newline at end of file + diff --git a/builds/msvc/properties/Debug.props b/builds/msvc/properties/Debug.props index 1a54192f3..dae4a6f8d 100644 --- a/builds/msvc/properties/Debug.props +++ b/builds/msvc/properties/Debug.props @@ -1,34 +1,37 @@ - + + - + - + <_PropertySheetDisplayName>Debug Settings Debug - + - + _DEBUG;_CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) + Disabled + OnlyExplicitInline + true + true EnableFastChecks ProgramDatabase - true - true - - OnlyExplicitInline - Disabled - _DEBUG;%(PreprocessorDefinitions) _DEBUG;%(PreprocessorDefinitions) true - + - - \ No newline at end of file + + diff --git a/builds/msvc/properties/DebugDEXE.props b/builds/msvc/properties/DebugDEXE.props index 18a066fce..4c1ab4e1b 100644 --- a/builds/msvc/properties/DebugDEXE.props +++ b/builds/msvc/properties/DebugDEXE.props @@ -1,8 +1,14 @@ - + + - <_PropertySheetDisplayName>Console Debug Dynamic + <_PropertySheetDisplayName>DebugDEXE Settings dynamic @@ -10,11 +16,11 @@ - + MultiThreadedDebugDLL - - \ No newline at end of file + + diff --git a/builds/msvc/properties/DebugDLL.props b/builds/msvc/properties/DebugDLL.props index c60aeed11..e181c9082 100644 --- a/builds/msvc/properties/DebugDLL.props +++ b/builds/msvc/properties/DebugDLL.props @@ -1,8 +1,14 @@ - + + - <_PropertySheetDisplayName>Dynamic Debug Library + <_PropertySheetDisplayName>DebugDLL Settings @@ -15,5 +21,5 @@ MultiThreadedDebugDLL - - \ No newline at end of file + + diff --git a/builds/msvc/properties/DebugLEXE.props b/builds/msvc/properties/DebugLEXE.props index 7fa92c035..ac7b18c2b 100644 --- a/builds/msvc/properties/DebugLEXE.props +++ b/builds/msvc/properties/DebugLEXE.props @@ -1,8 +1,14 @@ - + + - <_PropertySheetDisplayName>Console Debug Link Time Code Generation + <_PropertySheetDisplayName>DebugLEXE Settings @@ -17,4 +23,4 @@ - \ No newline at end of file + diff --git a/builds/msvc/properties/DebugLIB.props b/builds/msvc/properties/DebugLIB.props index 91762b460..9bb550a9a 100644 --- a/builds/msvc/properties/DebugLIB.props +++ b/builds/msvc/properties/DebugLIB.props @@ -1,19 +1,25 @@ - + + - + - <_PropertySheetDisplayName>Static Debug Library + <_PropertySheetDisplayName>DebugLIB Settings - + - + MultiThreadedDebug - \ No newline at end of file + diff --git a/builds/msvc/properties/DebugLTCG.props b/builds/msvc/properties/DebugLTCG.props index 8dafd5f4e..fad971f4b 100644 --- a/builds/msvc/properties/DebugLTCG.props +++ b/builds/msvc/properties/DebugLTCG.props @@ -1,13 +1,20 @@ - + + - + - <_PropertySheetDisplayName>Static Debug Link Time Code Generation Library + <_PropertySheetDisplayName>DebugLTCG Settings - + - + + @@ -16,4 +23,4 @@ - \ No newline at end of file + diff --git a/builds/msvc/properties/DebugSEXE.props b/builds/msvc/properties/DebugSEXE.props index fcd4e3300..cb23fe69c 100644 --- a/builds/msvc/properties/DebugSEXE.props +++ b/builds/msvc/properties/DebugSEXE.props @@ -1,8 +1,14 @@ - + + - <_PropertySheetDisplayName>Console Debug Static + <_PropertySheetDisplayName>DebugSEXE Settings static @@ -17,4 +23,4 @@ - \ No newline at end of file + diff --git a/builds/msvc/properties/EXE.props b/builds/msvc/properties/EXE.props index 354906458..7bba1cf0c 100644 --- a/builds/msvc/properties/EXE.props +++ b/builds/msvc/properties/EXE.props @@ -1,9 +1,15 @@ - + + - + - <_PropertySheetDisplayName>Console Application - true + <_PropertySheetDisplayName>Console Application Settings + true @@ -14,4 +20,5 @@ Console - \ No newline at end of file + + diff --git a/builds/msvc/properties/LIB.props b/builds/msvc/properties/LIB.props index 3835777cf..2fb89313d 100644 --- a/builds/msvc/properties/LIB.props +++ b/builds/msvc/properties/LIB.props @@ -1,16 +1,22 @@ - + + - + - <_PropertySheetDisplayName>Static Library + <_PropertySheetDisplayName>Static Library Settings static .lib - + _LIB;%(PreprocessorDefinitions) - \ No newline at end of file + diff --git a/builds/msvc/properties/LTCG.props b/builds/msvc/properties/LTCG.props deleted file mode 100644 index 02292938c..000000000 --- a/builds/msvc/properties/LTCG.props +++ /dev/null @@ -1,13 +0,0 @@ - - - - - <_PropertySheetDisplayName>Link Time Code Generation Library - - - - - - - - \ No newline at end of file diff --git a/builds/msvc/properties/Link.props b/builds/msvc/properties/Link.props index 1323369c1..cedc1a607 100644 --- a/builds/msvc/properties/Link.props +++ b/builds/msvc/properties/Link.props @@ -1,6 +1,12 @@ - + + - + <_PropertySheetDisplayName>Link Time Code Generation Settings ltcg @@ -9,7 +15,6 @@ true - true UseLinkTimeCodeGeneration @@ -19,4 +24,4 @@ - \ No newline at end of file + diff --git a/builds/msvc/properties/Release.props b/builds/msvc/properties/Release.props index 419a4f712..70ae50753 100644 --- a/builds/msvc/properties/Release.props +++ b/builds/msvc/properties/Release.props @@ -1,44 +1,45 @@ - + + - + <_PropertySheetDisplayName>Release Settings Release - - - - - false - false - true - true - Speed - true + NDEBUG;%(PreprocessorDefinitions) + MaxSpeed AnySuitable true + Speed true - MaxSpeed - - - ProgramDatabase + true + true + true true - NDEBUG;%(PreprocessorDefinitions) + false + false + ProgramDatabase NDEBUG;%(PreprocessorDefinitions) - true true true - + true + - \ No newline at end of file + + diff --git a/builds/msvc/properties/ReleaseDEXE.props b/builds/msvc/properties/ReleaseDEXE.props index 73deeae93..a51144ab1 100644 --- a/builds/msvc/properties/ReleaseDEXE.props +++ b/builds/msvc/properties/ReleaseDEXE.props @@ -1,8 +1,14 @@ - + + - <_PropertySheetDisplayName>Console Release Dynamic + <_PropertySheetDisplayName>ReleaseDEXE Settings dynamic @@ -17,4 +23,4 @@ - \ No newline at end of file + diff --git a/builds/msvc/properties/ReleaseDLL.props b/builds/msvc/properties/ReleaseDLL.props index 2071b33f6..e72003a8d 100644 --- a/builds/msvc/properties/ReleaseDLL.props +++ b/builds/msvc/properties/ReleaseDLL.props @@ -1,19 +1,25 @@ - + + - + - <_PropertySheetDisplayName>Dynamic Release Library + <_PropertySheetDisplayName>ReleaseDLL Settings - + MultiThreadedDLL - \ No newline at end of file + diff --git a/builds/msvc/properties/ReleaseLEXE.props b/builds/msvc/properties/ReleaseLEXE.props index beb73ef27..9078fb9d0 100644 --- a/builds/msvc/properties/ReleaseLEXE.props +++ b/builds/msvc/properties/ReleaseLEXE.props @@ -1,8 +1,14 @@ - + + - <_PropertySheetDisplayName>Console Release Link Time Code Generation + <_PropertySheetDisplayName>ReleaseLEXE Settings @@ -17,4 +23,4 @@ - \ No newline at end of file + diff --git a/builds/msvc/properties/ReleaseLIB.props b/builds/msvc/properties/ReleaseLIB.props index 2b250d579..6a9333ee8 100644 --- a/builds/msvc/properties/ReleaseLIB.props +++ b/builds/msvc/properties/ReleaseLIB.props @@ -1,10 +1,16 @@ - + + - <_PropertySheetDisplayName>Static Release Library + <_PropertySheetDisplayName>ReleaseLIB Settings - + @@ -16,4 +22,4 @@ - \ No newline at end of file + diff --git a/builds/msvc/properties/ReleaseLTCG.props b/builds/msvc/properties/ReleaseLTCG.props index 1814c6f3d..127492da4 100644 --- a/builds/msvc/properties/ReleaseLTCG.props +++ b/builds/msvc/properties/ReleaseLTCG.props @@ -1,13 +1,20 @@ - + + - <_PropertySheetDisplayName>Static Release Link Time Code Generation Library + <_PropertySheetDisplayName>ReleaseLTCG Settings - + - + + @@ -16,4 +23,4 @@ - \ No newline at end of file + diff --git a/builds/msvc/properties/ReleaseSEXE.props b/builds/msvc/properties/ReleaseSEXE.props index 2f5600a06..88fd16a72 100644 --- a/builds/msvc/properties/ReleaseSEXE.props +++ b/builds/msvc/properties/ReleaseSEXE.props @@ -1,8 +1,14 @@ - + + - <_PropertySheetDisplayName>Console Release Static + <_PropertySheetDisplayName>ReleaseSEXE Settings static @@ -17,4 +23,4 @@ - \ No newline at end of file + diff --git a/builds/msvc/properties/Win32.props b/builds/msvc/properties/Win32.props index 744098fe9..ba04cb33b 100644 --- a/builds/msvc/properties/Win32.props +++ b/builds/msvc/properties/Win32.props @@ -1,30 +1,26 @@ - + + - - - <_PropertySheetDisplayName>x86 Settings - - - + + <_PropertySheetDisplayName>Win32 Settings AdvancedVectorExtensions2 - + WIN32;_WIN32;%(PreprocessorDefinitions) StreamingSIMDExtensions StreamingSIMDExtensions2 AdvancedVectorExtensions AdvancedVectorExtensions2 AdvancedVectorExtensions512 - - - - - WIN32;_WIN32;%(PreprocessorDefinitions) - MachineX86 @@ -33,4 +29,10 @@ - \ No newline at end of file + + + --target=i686-pc-windows-msvc %(AdditionalOptions) + + + + diff --git a/builds/msvc/properties/x64.props b/builds/msvc/properties/x64.props index 4b997e4f9..054f85cd5 100644 --- a/builds/msvc/properties/x64.props +++ b/builds/msvc/properties/x64.props @@ -1,33 +1,26 @@ - + + - + <_PropertySheetDisplayName>x64 Settings - - - - AdvancedVectorExtensions2 - + WIN32;_WIN32;WIN64;_WIN64;%(PreprocessorDefinitions) StreamingSIMDExtensions StreamingSIMDExtensions2 AdvancedVectorExtensions AdvancedVectorExtensions2 AdvancedVectorExtensions512 - - - - - - WIN32;_WIN32;WIN64;_WIN64;%(PreprocessorDefinitions) - MachineX64 @@ -36,4 +29,4 @@ - \ No newline at end of file + diff --git a/builds/msvc/vs2026/libbitcoin-database-test/libbitcoin-database-test.props b/builds/msvc/vs2026/libbitcoin-database-test/libbitcoin-database-test.props index 34ce3fb6e..bbe937871 100644 --- a/builds/msvc/vs2026/libbitcoin-database-test/libbitcoin-database-test.props +++ b/builds/msvc/vs2026/libbitcoin-database-test/libbitcoin-database-test.props @@ -1,53 +1,42 @@ - + + - <_PropertySheetDisplayName>Libbitcoin Database Test Common Settings - AllRules.ruleset - false + <_PropertySheetDisplayName>libbitcoin-database-test Settings - + + + - $(RepoRoot)include\;(AdditionalIncludeDirectories) - false + stdcpp20 - + "$(TargetPath)" --log_level=warning --run_test=* --show_progress=no --build_info=yes - - - - ..\..\..\..\..\.nuget\packages\ - - - - dynamic - dynamic - - - ltcg - ltcg - - - static - static + + $(DefaultLinkage) + $(DefaultLinkage) - - - - + + diff --git a/builds/msvc/vs2026/libbitcoin-database.import.props b/builds/msvc/vs2026/libbitcoin-database.import.props index db77a39a9..2280838ac 100644 --- a/builds/msvc/vs2026/libbitcoin-database.import.props +++ b/builds/msvc/vs2026/libbitcoin-database.import.props @@ -1,38 +1,32 @@ - + + - <_PropertySheetDisplayName>Libbitcoin Database Import Settings + <_PropertySheetDisplayName>libbitcoin-database Import Settings - - - - - $(ProjectDir)..\..\..\..\..\libbitcoin-database\include\;%(AdditionalIncludeDirectories) - $(ProjectDir)..\..\..\..\..\libbitcoin-database\build\include\;%(AdditionalIncludeDirectories) + $(ProjectDir)..\..\..\..\..\libbitcoin-database\build\include\;$(ProjectDir)..\..\..\..\..\libbitcoin-database\include\;%(AdditionalIncludeDirectories) BCD_STATIC;%(PreprocessorDefinitions) libbitcoin-database.lib;%(AdditionalDependencies) - - - - $(ProjectDir)..\..\..\..\..\libbitcoin-database\bin\$(PlatformName)\Debug\$(PlatformToolset)\$(Linkage-libbitcoin-database)\; - $(ProjectDir)..\..\..\..\..\libbitcoin-database\obj\libbitcoin-database\$(PlatformName)\Debug\$(PlatformToolset)\$(Linkage-libbitcoin-database)\;%(AdditionalLibraryDirectories) - - - $(ProjectDir)..\..\..\..\..\libbitcoin-database\bin\$(PlatformName)\Release\$(PlatformToolset)\$(Linkage-libbitcoin-database)\; - $(ProjectDir)..\..\..\..\..\libbitcoin-database\obj\libbitcoin-database\$(PlatformName)\Release\$(PlatformToolset)\$(Linkage-libbitcoin-database)\;%(AdditionalLibraryDirectories) - + $(ProjectDir)..\..\..\..\..\libbitcoin-database\bin\$(PlatformName)\Debug\$(PlatformToolset)\$(Linkage-libbitcoin-database)\;$(ProjectDir)..\..\..\..\..\libbitcoin-database\obj\libbitcoin-database\$(PlatformName)\Debug\$(PlatformToolset)\$(Linkage-libbitcoin-database)\;%(AdditionalLibraryDirectories) + $(ProjectDir)..\..\..\..\..\libbitcoin-database\bin\$(PlatformName)\Release\$(PlatformToolset)\$(Linkage-libbitcoin-database)\;$(ProjectDir)..\..\..\..\..\libbitcoin-database\obj\libbitcoin-database\$(PlatformName)\Release\$(PlatformToolset)\$(Linkage-libbitcoin-database)\;%(AdditionalLibraryDirectories) $(ProjectDir)..\..\..\..\..\bin\$(PlatformName)\Debug\$(PlatformToolset)\dynamic\;%(AdditionalLibraryDirectories) $(ProjectDir)..\..\..\..\..\bin\$(PlatformName)\Release\$(PlatformToolset)\dynamic\;%(AdditionalLibraryDirectories) + diff --git a/builds/msvc/vs2026/libbitcoin-database/libbitcoin-database.props b/builds/msvc/vs2026/libbitcoin-database/libbitcoin-database.props index fa0fe3c75..f016a3839 100644 --- a/builds/msvc/vs2026/libbitcoin-database/libbitcoin-database.props +++ b/builds/msvc/vs2026/libbitcoin-database/libbitcoin-database.props @@ -1,49 +1,39 @@ - + + - <_PropertySheetDisplayName>Libbitcoin Database Library Common Settings - AllRules.ruleset - false + <_PropertySheetDisplayName>libbitcoin-database Settings - + + + - $(RepoRoot)include\;%(AdditionalIncludeDirectories) - $(RepoRoot)build\include\;%(AdditionalIncludeDirectories) - false - WITH_CONSENSUS;%(PreprocessorDefinitions) + stdcpp20 + $(RepoRoot)build\include\;$(RepoRoot)include\;%(AdditionalIncludeDirectories) BCD_DLL;%(PreprocessorDefinitions) BCD_STATIC;%(PreprocessorDefinitions) - - - - ..\..\..\..\..\.nuget\packages\ - - - - dynamic - - - ltcg - - - static + + $(DefaultLinkage) - - - + - \ No newline at end of file + diff --git a/builds/msvc/vs2026/libbitcoin-system.import.props b/builds/msvc/vs2026/libbitcoin-system.import.props index 612b7c138..480ed3d07 100644 --- a/builds/msvc/vs2026/libbitcoin-system.import.props +++ b/builds/msvc/vs2026/libbitcoin-system.import.props @@ -1,97 +1,108 @@ - + + - <_PropertySheetDisplayName>Libbitcoin System Import Settings + <_PropertySheetDisplayName>libbitcoin-system Import Settings - - - - - - - false false - false - false false false + false + false + false + false + false false false false - true - - - AdvancedVectorExtensions - AdvancedVectorExtensions2 + + AdvancedVectorExtensions + AdvancedVectorExtensions2 AdvancedVectorExtensions512 - - - - - - - - - - - - - - - - - - $(ProjectDir)..\..\..\..\..\libbitcoin-system\include\;%(AdditionalIncludeDirectories) - $(ProjectDir)..\..\..\..\..\libbitcoin-system\build\include\;%(AdditionalIncludeDirectories) - - - - WIN32_LEAN_AND_MEAN;NOMINMAX;_WIN32_WINNT=0x0A00;%(PreprocessorDefinitions) + $(ProjectDir)..\..\..\..\..\libbitcoin-system\build\include\;$(ProjectDir)..\..\..\..\..\libbitcoin-system\include\;%(AdditionalIncludeDirectories) BC_STATIC;%(PreprocessorDefinitions) - _CRTDBG_MAP_ALLOC;%(PreprocessorDefinitions) - - WITH_SHANI;%(PreprocessorDefinitions) - WITH_SHA512;%(PreprocessorDefinitions) WITH_AVX512IFMA;%(PreprocessorDefinitions) WITH_AVXIFMA;%(PreprocessorDefinitions) + WITH_SHANI;%(PreprocessorDefinitions) + WITH_SHA512;%(PreprocessorDefinitions) WITH_AESNI;%(PreprocessorDefinitions) WITH_VAES;%(PreprocessorDefinitions) + WITH_AES;%(PreprocessorDefinitions) WITH_SHA2;%(PreprocessorDefinitions) WITH_SHA3;%(PreprocessorDefinitions) - WITH_AES;%(PreprocessorDefinitions) - - - - /ignore:4099 %(AdditionalOptions) - + libbitcoin-system.lib;%(AdditionalDependencies) - - - - $(ProjectDir)..\..\..\..\..\libbitcoin-system\bin\$(PlatformName)\Debug\$(PlatformToolset)\$(Linkage-libbitcoin-system)\; - $(ProjectDir)..\..\..\..\..\libbitcoin-system\obj\libbitcoin-system\$(PlatformName)\Debug\$(PlatformToolset)\$(Linkage-libbitcoin-system)\;%(AdditionalLibraryDirectories) - - - $(ProjectDir)..\..\..\..\..\libbitcoin-system\bin\$(PlatformName)\Release\$(PlatformToolset)\$(Linkage-libbitcoin-system)\; - $(ProjectDir)..\..\..\..\..\libbitcoin-system\obj\libbitcoin-system\$(PlatformName)\Release\$(PlatformToolset)\$(Linkage-libbitcoin-system)\;%(AdditionalLibraryDirectories) - + $(ProjectDir)..\..\..\..\..\libbitcoin-system\bin\$(PlatformName)\Debug\$(PlatformToolset)\$(Linkage-libbitcoin-system)\;$(ProjectDir)..\..\..\..\..\libbitcoin-system\obj\libbitcoin-system\$(PlatformName)\Debug\$(PlatformToolset)\$(Linkage-libbitcoin-system)\;%(AdditionalLibraryDirectories) + $(ProjectDir)..\..\..\..\..\libbitcoin-system\bin\$(PlatformName)\Release\$(PlatformToolset)\$(Linkage-libbitcoin-system)\;$(ProjectDir)..\..\..\..\..\libbitcoin-system\obj\libbitcoin-system\$(PlatformName)\Release\$(PlatformToolset)\$(Linkage-libbitcoin-system)\;%(AdditionalLibraryDirectories) $(ProjectDir)..\..\..\..\..\bin\$(PlatformName)\Debug\$(PlatformToolset)\dynamic\;%(AdditionalLibraryDirectories) $(ProjectDir)..\..\..\..\..\bin\$(PlatformName)\Release\$(PlatformToolset)\dynamic\;%(AdditionalLibraryDirectories) + + + + -mavx -mavx2 %(AdditionalOptions) + -mavx512f -mavx512bw -mavx512vl %(AdditionalOptions) + -mavx512ifma -mavx512vl %(AdditionalOptions) + -mavxifma %(AdditionalOptions) + -msse4 -msha %(AdditionalOptions) + -mavx2 -msha512 %(AdditionalOptions) + -msse4.1 %(AdditionalOptions) + -msse4.1 -maes -mpclmul %(AdditionalOptions) + -mavx2 -maes -mpclmul -mvaes -mvpclmulqdq %(AdditionalOptions) + + + + + + armv8-a + armv8-a + armv8.2-a + %(ArmExtensions)+aes + %(ArmExtensions)+sha2 + %(ArmExtensions)+sha3 + + + + + + -march=%(ArmBase)%(ArmExtensions) %(AdditionalOptions) + + + + + + + + + + + + + + + + + + From 97ba4935b82ac6f3b3fb9897ad8b718e1b457d45 Mon Sep 17 00:00:00 2001 From: Eric Voskuil Date: Tue, 10 Nov 2026 09:45:12 -0500 Subject: [PATCH 2/2] Pass held wire accessors to the small-block fallback. --- .../database/impl/query/archive/wire_reader.ipp | 17 ++++++++++++----- include/bitcoin/database/query.hpp | 3 +++ 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/include/bitcoin/database/impl/query/archive/wire_reader.ipp b/include/bitcoin/database/impl/query/archive/wire_reader.ipp index 008cb5665..dcea8d580 100644 --- a/include/bitcoin/database/impl/query/archive/wire_reader.ipp +++ b/include/bitcoin/database/impl/query/archive/wire_reader.ipp @@ -261,15 +261,22 @@ TEMPLATE bool CLASS::get_wire_block(bytewriter& sink, const header_link& link, bool witness) const NOEXCEPT { - if (!get_wire_header(sink, link)) - return false; - const auto txs = to_transactions(link); if (txs.empty()) return false; + return get_wire_block(sink, get_wire_accessors(), link, txs, witness); +} + +// protected +TEMPLATE +bool CLASS::get_wire_block(bytewriter& sink, const wire_accessors& ptrs, + const header_link& link, const tx_links& txs, bool witness) const NOEXCEPT +{ + if (!get_wire_header(sink, link)) + return false; + sink.write_variable(txs.size()); - const auto ptrs = get_wire_accessors(); for (const auto& tx_link: txs) if (!get_wire_tx(sink, ptrs, tx_link, witness)) return false; @@ -382,7 +389,7 @@ bool CLASS::get_wire_block(const system::data_slab& out, { stream::out::fast sink{ out }; Writer writer{ sink }; - return get_wire_block(writer, link, witness) && writer; + return get_wire_block(writer, ptrs, link, txs, witness) && writer; } const auto region = [&](size_t offset, size_t size) NOEXCEPT diff --git a/include/bitcoin/database/query.hpp b/include/bitcoin/database/query.hpp index 8e902d83d..fbf70c269 100644 --- a/include/bitcoin/database/query.hpp +++ b/include/bitcoin/database/query.hpp @@ -1368,6 +1368,9 @@ class query const ins_link& link) const NOEXCEPT; bool get_wire_tx(bytewriter& sink, const wire_accessors& ptrs, const tx_link& link, bool witness) const NOEXCEPT; + bool get_wire_block(bytewriter& sink, const wire_accessors& ptrs, + const header_link& link, const tx_links& txs, + bool witness) const NOEXCEPT; /// History. /// -----------------------------------------------------------------------