Repository navigation
tools/ci: the Boost action patches mul128.hpp for MSVC ARM64 until boostorg/hash2#49 ships - #54
Merged
Merged
Conversation
…ostorg/hash2#49 ships Boost 1.92.0's boost/hash2/detail/mul128.hpp repeats, in its _M_ARM64 branch, the signature and opening brace of mul128_impl, so MSVC for ARM64 stops with C2601 in every translation unit that includes boost/hash2/xxh3.hpp, most of webcpp::crypto and webcpp::hash. tools/ci/actions/boost/install.sh, which provisions Boost for every CI job (the lanes, the MSVC ones among them, the docs, the lint and the site), now applies each patch of tools/ci/actions/boost/patches to the tree it extracts before anything is installed or kept from it. A patch that no longer applies, or that the archive already holds, fails the action naming it, so that it is removed rather than skipped; the patches are part of the cache key; and configure refuses a prefix whose headers lack one. git apply runs with GIT_CEILING_DIRECTORIES so that a tree inside a repository is patched rather than skipped without a word. The first patch removes the two repeated lines, as the upstream fix does (boostorg/hash2#49). The ruling, approved by the owner on 2026-11-22, is recorded in CODING-GUIDELINES.md chapter 14.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Boost 1.92.0's
boost/hash2/detail/mul128.hpprepeats, in the#elif defined(_M_ARM64) || defined(_M_ARM64EC)branch ofmul128, the signature and opening brace ofmul128_impl, so MSVC for ARM64 stops with C2601 in every translation unit that includesboost/hash2/xxh3.hpp(most of webcpp::crypto and webcpp::hash). Upstream fix: boostorg/hash2#49. The owner approved carrying it locally until a Boost release contains it.How it is applied: in the one place that provisions Boost for every CI job (lanes, MSVC included, docs, lint, site),
tools/ci/actions/boost/install.sh.tools/ci/actions/boost/patches/hash2-mul128-msvc-arm64.patch: agit applypatch of Boost's headers against the archive's root; its opening paragraph names Fix MSVC ARM64 build of mul128 boostorg/hash2#49.install.shapplies every patch to each tree it extracts (installandsource), before anything is installed or kept. A patch that no longer applies, or that the archive already holds (a new Boost with the fix), fails the action naming it, so it is removed rather than skipped; one touching anything outsideboost/is refused.git applyruns withGIT_CEILING_DIRECTORIES, so a tree inside a git repository is patched rather than silently skipped.check(run byinstallandconfigure) refuses a prefix whose headers lack one.Verification, local:
install.sh installon macOS with the pinned archive: the installedmul128.hpphas exactly the two lines removed;configureaccepts the prefix.libs/crypto/test//async_post(includesxxh3.hppand the patchedmul128.hpp) and//equalpass.tools/ci/actions_test.py: all cases pass, with four new ones (patched headers, also inside a git repository; key changes with the patches; failure on an already-applied, a stale and an out-of-headers patch; each patch names its upstream fix).