build(libs): support Emscripten memory64 compilation #9092

Closed
SteelCrab wants to merge 2 commits from upstream-pr/9092 into main
SteelCrab commented 2026-10-21 12:06:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by SteelCrab on 2026-10-21T12:06:52Z.


What

Superseded by #11341, which carries the current-main rebase, expanded native/memory64 source compilation and current validation. This PR retains the earlier review snapshot and will stay closed.

Make shared system-library sources compile with Emscripten memory64, including guest memory, file/process interfaces, ABI declarations and x87 guest long-double storage. Unsupported paths throw and libc limitations are recorded in docs/dev/debt/libc.md.

The historical Tested section below records the previous rebase and its results. Current main compatibility and validation are tracked in #11341.

Extracted prerequisite of #6879. Depends on records the agreed staging order. No GuestBesselSecondKindZero correction, Bessel regression or debt removal is included; #8864 remains separate.

Historical tested source: earlier branch diff. GitHub rejected reopening after the branch history changed; #11341 provides the active diff.

Tested

Ubuntu 26.04.1 x86-64, GCC 15.2, Emscripten 6.0.12, Node 26.12.0. Rebased onto main a6646f8464140180351e4c08694dccdd55b2814d; tested head f39e532e3e.

  • Native core/libs/tests/emscripten Release build and guest_long_double: 1/1 passed.
  • Emscripten memory64 object target for 16 library sources built successfully; guest_long_double under Node 26: 1/1 passed, covering signed zeros, normal/subnormal values, infinity and NaN round trips.
  • Existing native video_out_output_mode_policy, compiled from main and this branch's Output.cpp: 1/1 passed on each. These focused tests are CPU-only. Both verbose CTest runs used ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation; neither log reports a missing validation layer or a VUID- error.
  • python3 tools/check_conventions.py --base origin/main and the complete PR-template check passed locally. Merge check against the tested main is clean; range-diff confirms only the debt-entry context changed while rebasing the portability commits.

CI coverage: Emscripten library portability / library-portability builds the memory64 source target and runs the native/Node conversion tests. Maintainer-triggered Build / linux and windows cover full native libraries and the VideoOut regression. No remote build result is claimed for the rebased head. Full native-library suites, Windows and browser rendering were not run locally.

This PR remains closed and is superseded by #11341; #10017 has merged. The earlier Emscripten run expired awaiting approval before executing any jobs. There are no remote check runs for the updated source commit; the results above are local.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: #10017
  • Fixes: none
  • Unblocks: none
  • GPUs tested: No GPU rendering tested; native VideoOut policy regression is CPU-only
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4951265402 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9092). Originally posted by [SteelCrab](https://github.com/SteelCrab) on 2026-10-21T12:06:52Z. --- ### What Superseded by #11341, which carries the current-main rebase, expanded native/memory64 source compilation and current validation. This PR retains the earlier review snapshot and will stay closed. Make shared system-library sources compile with Emscripten memory64, including guest memory, file/process interfaces, ABI declarations and x87 guest long-double storage. Unsupported paths throw and libc limitations are recorded in `docs/dev/debt/libc.md`. The historical Tested section below records the previous rebase and its results. Current main compatibility and validation are tracked in #11341. Extracted prerequisite of #6879. `Depends on` records the agreed staging order. No `GuestBesselSecondKindZero` correction, Bessel regression or debt removal is included; #8864 remains separate. Historical tested source: [earlier branch diff](https://github.com/SteelCrab/AnyPS5/compare/a6646f8464140180351e4c08694dccdd55b2814d...f39e532e3ec35bcb73e8f88f7aafe403237121bf). GitHub rejected reopening after the branch history changed; #11341 provides the active diff. ### Tested Ubuntu 26.04.1 x86-64, GCC 15.2, Emscripten 6.0.12, Node 26.12.0. Rebased onto main `a6646f8464140180351e4c08694dccdd55b2814d`; tested head `f39e532e3e`. - Native `core/libs/tests/emscripten` Release build and `guest_long_double`: **1/1 passed**. - Emscripten memory64 object target for **16 library sources** built successfully; `guest_long_double` under Node 26: **1/1 passed**, covering signed zeros, normal/subnormal values, infinity and NaN round trips. - Existing native `video_out_output_mode_policy`, compiled from main and this branch's `Output.cpp`: **1/1 passed on each**. These focused tests are CPU-only. Both verbose CTest runs used `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`; neither log reports a missing validation layer or a `VUID-` error. - `python3 tools/check_conventions.py --base origin/main` and the complete PR-template check passed locally. Merge check against the tested main is clean; range-diff confirms only the debt-entry context changed while rebasing the portability commits. CI coverage: **Emscripten library portability / `library-portability`** builds the memory64 source target and runs the native/Node conversion tests. Maintainer-triggered **Build / `linux` and `windows`** cover full native libraries and the VideoOut regression. No remote build result is claimed for the rebased head. Full native-library suites, Windows and browser rendering were not run locally. This PR remains closed and is superseded by #11341; #10017 has merged. The earlier Emscripten run expired awaiting approval before executing any jobs. There are no remote check runs for the updated source commit; the results above are local. <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: #10017 <!-- #PR, or none --> - [x] Fixes: none <!-- issue it closes as Fixes #N, or none --> - [x] Unblocks: none <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> - [x] GPUs tested: No GPU rendering tested; native VideoOut policy regression is CPU-only <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> - [x] AI-assisted: yes <!-- yes / no -->
github-actions[bot] commented 2026-10-21 12:07:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-21T12:07:13Z.


Thank you for your contribution! Authors with no pull requests merged into main can have 1 open pull request at a time, authors with at least 1 merged can have 20, and from 20 merged there is no limit. This PR has been automatically closed and labeled "open PR limit" because that limit was reached. This is not a judgment of the quality of your changes: reopen it once one of your open pull requests is merged or closed.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6315501030 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9092#issuecomment-6315501030). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-21T12:07:13Z. --- Thank you for your contribution! Authors with no pull requests merged into `main` can have 1 open pull request at a time, authors with at least 1 merged can have 20, and from 20 merged there is no limit. This PR has been automatically closed and labeled "open PR limit" because that limit was reached. This is not a judgment of the quality of your changes: reopen it once one of your open pull requests is merged or closed.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!9092
No description provided.