Skip to content

Fix MSVC ARM64 build of mul128 - #49

Closed
pinhopro wants to merge 1 commit into
boostorg:developfrom
pinhopro:fix-mul128-arm64
Closed

pinhopro wants to merge 1 commit into
boostorg:developfrom
pinhopro:fix-mul128-arm64

Conversation

@pinhopro

Copy link
Copy Markdown

The _M_ARM64 branch of mul128 repeats the mul128_impl signature and its opening brace, so MSVC ARM64 fails with error C2601: 'mul128_impl': local function definitions are illegal in every translation unit that includes xxh3.hpp. This removes the two duplicated lines.

Tested with MSVC 14.44 (ARM64) on Windows 11 ARM64.

pinhopro pushed a commit to webcpporg/webcpp that referenced this pull request Nov 23, 2026
…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.
pinhopro added a commit to webcpporg/webcpp that referenced this pull request Nov 23, 2026
tools/ci: the Boost action patches mul128.hpp for MSVC ARM64 until boostorg/hash2#49 ships
@pdimov

pdimov commented Nov 23, 2026

Copy link
Copy Markdown
Member

Why did you close this?

@pdimov pdimov reopened this Nov 23, 2026
@pdimov

pdimov commented Nov 23, 2026

Copy link
Copy Markdown
Member

Merged as f835d0a.

@pdimov pdimov closed this Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants