fix(build): isolate canonical runtime patch dependencies #19519
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/19519"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by IvanFogel on 2026-11-13T13:04:40Z.
What
Building one canonical patched runtime currently pulls every unpatched PRX into its dependency closure. Give each existing patched/copy output its own private owning target, and make the public
libsaggregate depend on those targets. Focused builds retain their real libc/kernel/backend prerequisites; the full aggregate retains every output. Canonical copy/patch commands, export preservation, paths, optional runtime copies and the CMake 3.20 minimum stay unchanged.Add a real-project Ninja graph regression and a compiler-free fixture that includes the production helper, proves selected-input invalidation, excludes an intentionally broken unrelated runtime from focused builds, and retains that failure in the full aggregate.
Tested
Current main refresh:
d43d250189579f1c475481416841cdbe099cf099ond261fa6f56657357c39d1d4c26ba2546a94add7e. Every own range-diff entry is unchanged. The actual repository Ninja dependency graph and helper CTests both pass. The helper also passes with Ninja Multi-Config, including focused copy/invalidation, rejection of unrelated failed runtime work, and the complete aggregate. Main already contains upstream CES revertbbc937d05536ad0dce4e7a91b90e0d20cbd21360; the four formerly timing-out cases pass under Wine on the current-main-based extrema candidate. This does not replace fresh upstream full Windows CI. Earlier exact-head results below remain historical, including external reports not rerun here. Refresh pins and full local qualification.Linux x86-64, CachyOS/Arch, GCC 16.2.1 Release, Ninja 1.13.2. Candidate
0576bd5c2c04749a6ce5f7059b879a633e2e0840, based on main269242f6e48117c444e6f2c3dfcea17561302a57.patched_librariesloads all 413 libraries with zero failures.nid_*/patched_librariesCTests pass without CTest skips. A real patched ICU NID call also distinguishes alphabetic ASCII/Greek/CJK input from a digit.origin/mainandgit diff --checkpass.Full runtime logs, aggregate equivalence, version matrix and manual overlap audit.
Canonical overlap scan and all 16 reported shared-file patches were inspected. Fifteen only add or adjust independent test registrations. #16793 adds independent APPLE-only executables immediately after the aggregate, giving a textual insertion conflict: a future composition must preserve this helper call and that APPLE block. No implementation duplication or semantic dependency was found; no agreed landing order or joint macOS run is claimed.
Full Windows/macOS builds were not run. Dependency-scope counts are graph evidence; no measured build-speed, FPS or title-unblock claim.
Refresh validation (2026-11-13): based on main
c76eb6a26433216e2219fa9937e9cd57254be272, tested PR headf875fa2fd7cb1296256d50b8f456eefe99bbbb13.All 16 NID/patched-library CTests passed without skips. The new graph regression fails on matched main and passes on this candidate. All 4007 aggregate command strings are unchanged as sets; the full candidate runtime aggregate builds and loads all 413 patched libraries. These are dependency and correctness checks, with no measured build-speed claim.
Refresh logs and installation/validation evidence. Earlier results above remain evidence for their explicitly recorded commits; old Windows/macOS CI reports were not rerun by this local validation. Fresh platform CI results are separate.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by Superseabas on 2026-11-13T14:19:52Z.
Review: APPROVED
Windows check of head
0576bd5c2cwith GCC 16, merged ontomainc76eb6a264(clean merge). It adds amaincomparison, the full aggregate and a focused build to JJenkx's run of the two new tests above.Setup: Windows 11 Home 10.0.26200, WinLibs GCC 16.2.0 (
x86_64-ucrt-posix-seh, r3), CMake 4.4.4, Ninja 1.13.2, Release full build, run from PowerShell.mainvs this PR (ninja -t query/ninja -t commandsoncore/libs/libs/<lib>.prx):main, patchedlibSceIcu.prxandlibScePad.prxeach depend on all 413 unpatched.prx, and building either one takes 3339 commands.libSceIcu.prxdepends only onunpatched/libSceIcu.prx,libc.prxandlibkernel.prx, and takes 419 commands (libScePad.prx: 244).main's graph, the new script in--mode graphfails withfocused libSceIcu patch requires unrelated libScePad. Against this PR's graph it passes.ninja -t commands libsgives the same 3753 commands onmainand this PR, with 0 lines different as sets. That includes the 413nid_patcherpatch commands and the Windows-only copies (mimalloc.dll,mimalloc-redirect.dll, the MinGW runtime DLLs).ninja core/libs/libs/libSceIcu.prxon a build last brought up to date days earlier ran 178 steps in 25 s. Those were the ICU objects,unpatched/libSceIcu.prxand its NID patch, and no other library. The fulllibsaggregate then built (2389 steps).nid_patch_dependenciesandnid_patch_dependencies_helperpass in 3 of 3 runs (0.4 s and 1.6 s, well inside the 20 s timeout). The helper fixture handles a temporary directory with spaces andC:\paths. With the full aggregate built,ctest -R '^nid_|patched_libraries'passes 15 of 15, in 2 of 2 runs.Reading the change:
add_patched_runtime_targetsattaches each output's custom command to exactly onelibs_output_Ntarget, so no output's command is shared between targets.libskeeps every output throughadd_dependencies, andpatched_libraries_testsstill depends onlibsas before. The new tests are registered only for Ninja generators, which fits theninja -tqueries.Not run: macOS, and Multi-Config generators on Windows.
AI-assisted: yes (Claude Code)