fix(build): skip the core/libs relinker CLI tests when ANYPS5_RELINKER_CLI is OFF #12068
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/12068"
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 dantdmdarealguy on 2026-10-27T18:37:17Z.
What
On
main, a test build without the native relinker command line fails to generate. This happens on Windows and on Linux:core/relinker/CMakeLists.txtdefines therelinkerexecutable only whenANYPS5_RELINKER_CLIis ON. Its own command line tests come after theif(NOT ANYPS5_RELINKER_CLI) return(), so they drop out with it. Five tests registered incore/libsalso run the relinker command line, but nothing guards them:exec_arguments,loadexec_arguments,guest_timed_join_import_libkernel_{sys,web}(Windows),guest_runtime_lifecycleandagc_driver_guest_memory_lifetime_converted(Linux). The option can't guard them in place, because it was declared incore/relinker, which the rootCMakeLists.txtadds aftercore/libs.The change:
ANYPS5_RELINKER_CLIin the rootCMakeLists.txtnext toANYPS5_BUILD_WASM, beforecore/libs. The WASM branch still forces the option OFF, andcore/relinkerno longer declares it.AND ANYPS5_RELINKER_CLIto the existing conditions around those five registrations (thePython3_FOUND/Python3_Interpreter_FOUNDchecks).The default build (option ON) registers exactly the same tests as before. No CI job builds the option OFF with tests. #11455 (open) adds
-DANYPS5_RELINKER_CLI=OFFto the BUILD.md option table as a user-facing flag. No title is involved: this fixes a broken build configuration.Tested
Windows 11 Pro, Intel Core i9-14900K, 128 GB RAM, NVIDIA GeForce RTX 5080 (driver 32.0.16.1742), WinLibs GCC 15.2.0, Release, on
2ee8e9751a. Linux: Arch Linux on WSL2, GCC 16.1.1, glibc 2.43, Release, no Vulkan device.ctest --parallel 2 --timeout 300withANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 SDL_AUDIODRIVER=dummyon Windows, andANYPS5_NO_SHADER_CACHE=1 SDL_AUDIODRIVER=dummyon Linux.main14332cd8d0: the Windows configure with-DBUILD_TESTING=ON -DANYPS5_RELINKER_CLI=OFFgenerates, and every$<TARGET_FILE:relinker>/relinkerdependency undercore/libson that head is inside anANYPS5_RELINKER_CLIcondition.-DBUILD_TESTING=ON -DANYPS5_RELINKER_CLI=OFFonmain: generate fails on Windows (4 errors, above) and on Linux (6 errors). With this change it generates on both.libsbuilds, andctestpasses 2478 of 2479. The one failure ishardware_oracle, which fails here because of the LLVMld.lldon PATH.patched_librariesreports368 patched libraries loaded, 0 failed.ctestpasses 2362 of 2366. The 4 failures are the AGC tests that fail without a Vulkan device onmaintoo (#11638).tools/check_test_registration.py:0 built and not runon Windows (1439 executables) and Linux (1435).CTestTestfile.cmakefiles are identical tomainon Windows and Linux. Paths were normalised, and the only difference is backtrace line numbers.ctest -R "^(exec_arguments|loadexec_arguments|guest_timed_join_import_libkernel_sys|guest_timed_join_import_libkernel_web)$|patched_libraries"passes 5 of 5 (368 patched libraries loaded, 0 failed).check_test_registration.pyreports1469 test executable(s), 0 built and not run as recorded, none new.mainthe same build passes 2667 of 2668 in fullctest. The exception is one intermittentagc_driver_pm4_rewind_tracefailure, which passes 5 of 5 alone and is unrelated.tools/check_conventions.py --base origin/mainpasses.tools/pr_overlap.py --branch fix/relinker-cli-off-test-registrationsreports no conflicting lines, but it couldn't compare 86 PRs that conflict withmain. Of those, I checked the ones that touch these lines:loadexecLibrariesline directly below the guardedif, so it is an adjacent-line conflict for whichever merges second.$<TARGET_FILE:relinker>tests insidecore/relinker, after its existingreturn(), so they are unaffected.ANYPS5_RELINKER_ONLY, which skipscore/libs.libSceAgcDriveredit only removes the Linuxagc_driver_guest_memory_lifetime_convertedregistration when the option is OFF. The default registration is unchanged, and Windows doesn't register that test, so I ran no GPU validation runs.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 MarcZX10 on 2026-10-27T18:44:26Z.
Review: APPROVED
Reviewed exact head
b10f3d89150919c0ff730ebfc07959773d0d4929. Moving the option declaration to the root makes it available tocore/libs; the relinker-dependent test registrations/dependencies are gated, while the default-ON path remains unchanged by inspection.\n\nValidation here: a fresh Linux CMake configure withBUILD_TESTING=ONandANYPS5_RELINKER_CLI=OFFcompleted and generated successfully.ctest -Nfound none of the six relinker CLI tests that must be omitted in this mode;git diff --checkand current-base conventions passed. Hosted Linux/Windows builds are still pending; I did not claim they passed.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-27T20:43:25Z.
Review: DISMISSED
The option declaration and conditional registrations look correct, and the reported OFF/default configurations cover the relevant behavior. I independently confirmed this head merges cleanly with current main. The overlap bot flags open #11051, however, and a pairwise merge-tree of the exact current heads conflicts in core/libs/prx/libSceSystemService/CMakeLists.txt. Please coordinate which one lands first and declare the required Depends on/order, or rebase after the other lands, so the default test registration is preserved. No independent defect found in this PR's CMake logic.
Imported from boykopovar/AnyPS5. Originally posted by THEMANnt on 2026-10-28T10:45:38Z.
Review: COMMENTED
Reviewed
b10f3d89150919c0ff730ebfc07959773d0d4929— comment; merge validation remains incomplete. CLI-dependent core/libs tests and fixture dependencies are guarded when ANYPS5_RELINKER_CLI is OFF, with the option declared before library configuration.Evaluated every changed CMake guard for Windows/Linux with CLI ON/OFF, using the submitted blocks and recording target/test operations. Candidate OFF branches contain no relinker references; baseline blocks retain the references, and candidate ON paths remain enabled where applicable. This is CMake control-flow validation, not a full system-library build or a native execution of those guest tests. Hosted Build succeeded on this head, but the publication-time refresh now reports a conflict with main. Please resolve it and rerun the affected configuration checks before final approval; the conflict alone is not a demonstrated code defect.
Imported from boykopovar/AnyPS5. Originally posted by THEMANnt on 2026-10-28T17:06:42Z.
Review: COMMENTED
Re-reviewed
c5a69e8e46f38becbf59a58662db02971fb6a980— approve. Moving the CLI option before library configuration and guarding CLI-dependent registrations fixes the missing-target generation failure whenANYPS5_RELINKER_CLI=OFF.Actual Windows/GCC 15.3 Release configurations: head ON and OFF both generate successfully; the head OFF graph contains no relinker target or CLI-dependent library tests. Head ON retains the same registered-test catalogue as baseline ON. Baseline OFF reproduces the generator errors for
$<TARGET_FILE:relinker>in the three affected library registrations. The standalone timed-join executable builds, and its normal/coarse CTests pass 2/2 on head OFF and 2/2 on baseline ON, confirming the unrelated tests remain available.The Linux-only guards were source-reviewed, not executed on Linux. No full library/product suite, graphics workload or title run is claimed. No remaining defect was found in the tested configuration scope.
Publication-time checks: Build: queued. Please complete these checks before final approval; this status alone is not a demonstrated implementation defect.