2 minor findings · 3 suggestions
Earlier concerns neither republished nor resolved: 2 minor findings · 1 suggestion. See the Run archive for their assessments.
Findings
[minor] · Windows presets can mismatch the target and vcpkg dependency architectures
On ARM64 Windows hosts, the presets can build ARM64 objects against x64 dependencies, causing linking to fail.
Location: CMakePresets.json:12 (head).
Details and suggested fix
The base presets pinned the Visual Studio generator and x64 architecture. The windows and windows-static presets now set only the ClangCL toolset while retaining the x64-windows and x64-windows-static vcpkg triplets. Without an explicit architecture, Visual Studio generators default to the host platform. On an ARM64 host, cmake -B build --preset windows-static therefore builds ARM64 objects against x64 libraries, and linking fails. This command previously built x64 on any host. Removing the generator pin also means the preset fails if CMAKE_GENERATOR=Ninja is set, because Ninja does not accept a toolset. Restore the x64 architecture and, if the VS 18 requirement should be enforced, the generator pin; alternatively, select the triplet based on the target architecture. The impact is limited to ARM64 Windows hosts; CI runs on x64. Passing -A x64 avoids the dependency mismatch but encounters the builtins-suffix issue described separately.
[minor] · Builtins archive selection follows the host processor rather than the compiler target
When the Visual Studio target architecture differs from the host, this selects a builtins archive for the wrong architecture and linking fails; no checked-in preset or CI job exercises this mismatch.
Location: CMakeLists.txt:329 (head).
Details and suggested fix
The new block selects clang_rt.builtins-x86_64 or clang_rt.builtins-aarch64 from CMAKE_SYSTEM_PROCESSOR and links it through core_interface. For a native, non-cross configure, that variable describes the host and need not match the target. With the Visual Studio generator, -A x64 on an ARM64 host leaves it set to ARM64, so x64 objects get the aarch64 archive. Conversely, -A ARM64 on an AMD64 host selects the x86_64 archive. Linking then fails because the archive is missing or has a conflicting machine type. The archive is needed for the __int128 division in FeeFrac::Div. Derive the suffix from the compiler target instead, such as from CMAKE_VS_PLATFORM_NAME with the Visual Studio generator or CMAKE_CXX_COMPILER_ARCHITECTURE_ID. No checked-in preset or CI job uses a host/target mismatch, so production impact is unconfirmed.
Optional improvements
[suggestion] · CI-only warning downgrades make native builds behave differently from CI
Without CI’s CXXFLAGS, native builds can emit return-type warnings and fail with CMAKE_COMPILE_WARNING_AS_ERROR; CI also makes three warning classes non-fatal across first-party code.
Location: .github/ci-windows.py:71 (head).
Details and suggested fix
The base suppressed C4715 for every MSVC build in CMake, but the new if(MSVC) warning branch has no equivalent. Instead, ci-windows.py sets CXXFLAGS to downgrade return-type, conditional-uninitialized, and unused-macros warnings. Clang-cl can warn when non-void functions end in assert(false);, as in EvalChecksig, because the MS CRT assert does not end in a noreturn call; this pattern recurs across the tree. Developers following the native guide see these warnings, and configuring with -DCMAKE_COMPILE_WARNING_AS_ERROR=ON, as both Windows CI jobs do, turns them into errors unless they copy the CI environment. In CI, the configure-wide flags also make future instances of all three warning classes non-fatal in first-party code. Move the MS CRT-specific return-type exception into the if(MSVC) branch of warn_interface, mirroring the old /wd4715. Fix or locally scope the conditional-uninitialized and unused-macros sites instead of downgrading them in CI. The supplied evidence does not identify which sources trigger those last two warning classes.
[suggestion] · The native Windows guide does not specify the clang-cl version requirement
The guide points to a general Clang minimum, while the dependencies table gives a separate Visual Studio minimum and no clang-cl version, leaving the required toolchain unclear.
Location: doc/build-windows-native.md:32 (head).
Details and suggested fix
The guide says the “C++ Clang Compiler for Windows” component must meet the minimum Clang version in dependencies.md. That table lists Clang 17.0 for ordinary Clang and Visual Studio 18.7 for clang-cl, but does not give a clang-cl version. The stated actual floor is LLVM 22.1.3, bundled with Visual Studio 18.7. The previous guide’s explicit minimum Visual Studio version was removed, and CMake only prints the compiler version without checking it. State the requirement directly in the guide, such as “Visual Studio 2026 18.7 or later (bundled clang-cl 22.1.3 or later),” and point readers to the Windows row.
[suggestion] · The MSVC-only <cstdlib> include is no longer used
The include served the removed _byteswap_* branch and now adds an unnecessary header to a widely included compatibility header.
Location: src/compat/byteswap.h:29 (base).
Details and suggested fix
<cstdlib> is included under #ifdef _MSC_VER for the former branch that mapped the byte-swap helpers to _byteswap_ushort, _byteswap_ulong, and _byteswap_uint64. The helpers now use __builtin_bswap* or local bit operations, leaving this include as the header’s last _MSC_VER reference. Remove the include. Any clang-cl translation unit that relied on it transitively would be exposed by the Windows CI build.
Earlier concerns
Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.
- [minor]: Windows preset can fail when Ninja is the default generator
- [minor]: Keep the large-object workaround for clang-cl debug builds
- [suggestion]: Remove the unused MSVC-only
<cstdlib>include