Repository navigation
[rapidjson] Fix ARM64EC detection for _umul128 - #54321
Merged
Billy O'Neal (BillyONeal) merged 2 commits intoOct 6, 2026
Merged
Billy O'Neal (BillyONeal) merged 2 commits into
Billy O'Neal (BillyONeal) merged 2 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused fix is consistent across both affected headers, and all port-version metadata is coherent.
Review effort: Balanced
Findings: None
What changed in this PR
Backports RapidJSON’s ARM64EC detection fix so _umul128 uses the soft-intrinsic path correctly.
Changes:
- Replaces
_ARM64EC_checks with compiler-defined_M_ARM64EC. - Applies the patch and increments the port version.
- Updates baseline and version metadata.
| File | Description |
|---|---|
ports/rapidjson/fix-arm64ec-umul128.patch |
Corrects ARM64EC guards in two headers. |
ports/rapidjson/portfile.cmake |
Applies the upstream patch. |
ports/rapidjson/vcpkg.json |
Increments the port version. |
versions/baseline.json |
Updates the baseline port version. |
versions/r-/rapidjson.json |
Adds the verified port-version entry. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Billy O'Neal (BillyONeal)
approved these changes
Oct 6, 2026
Member
There was a problem hiding this comment.
Thanks for the fix and notifying upstream! One note from GPT 6.1 Sol:
- F1 — Pre-existing installed-content licensing discrepancy. ports/rapidjson/vcpkg.json declares only MIT, but the installed msinttypes
stdint.handinttypes.hcarry BSD-3-Clause terms; see include/rapidjson/msinttypes/stdint.h. The copyright file and header notices are retained; this is not missing attribution. A follow-up should accurately declare installed-content licensing and update the corresponding version metadata.MIT AND BSD-3-Clauseis a straightforward expression, not the uniquely required solution. Retain the compatibility headers, and do not add JSON solely because the copyright text mentions noninstalled JSON_checker sources. This pre-existing issue need not block this focused compatibility PR.
EDIT: I think the right fix is probably to just not install those files at all because MSVC has come with stdint.h for more than 10 years now...
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.
Backports Tencent/rapidjson#2399 (open), which fixes Tencent/rapidjson#2389.
include/rapidjson/internal/biginteger.handinclude/rapidjson/internal/diyfp.hdetect ARM64EC with_ARM64EC_. The compiler does not predefine that macro;<windows.h>defines it. The compiler-predefined macro is_M_ARM64EC(MSVC predefined macros). Unless<windows.h>is included first, ARM64EC builds (which also define_M_AMD64) take the x64 branch and use#pragma intrinsic(_umul128), which is not available on ARM64EC:Consumers building with
/WXfail.fix-arm64ec-umul128.patchreplaces_ARM64EC_with_M_ARM64ECin both headers, so the existing softintrin path is used regardless of include order. The patch is a no-op unless_M_ARM64ECis defined. It can be dropped once the port moves to a commit that includes Tencent/rapidjson#2399.Tested:
vcpkg install rapidjson:x64-windowssucceeds and the installed headers contain the patched guards.A TU that parses and writes numbers with
rapidjson::Document, compiled with MSVC 19.42.34439cl /c /EHsc /W4 /std:c++17 /arm64EC: the warnings above appear before the patch. After the patch the TU builds cleanly, including with/WX. x64 and ARM64 are clean before and after.Our CI builds rapidjson for ARM64EC (
/arm64EC) with this same change applied, and builds the consumers that include these headers.Changes comply with the maintainer guide.
SHA512s are updated for each updated download. (No downloads changed.)
The "supports" clause reflects platforms that may be fixed by this new version. (Unchanged.)
Any fixed CI baseline entries are removed from that file. (None.)
Any patches that are no longer applied are deleted from the port's directory. (None.)
The version database is fixed by rerunning
./vcpkg x-add-version --alland committing the result.Only one version is added to each modified port's versions file.
This change was prepared with help from GitHub Copilot.