build(relinker): add a dependency-free conversion build mode #1432

Merged
ToyuAU merged 1 commit from upstream-pr/1432 into main 2026-10-08 13:43:52 +00:00
ToyuAU commented 2026-10-08 05:55:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ToyuAU on 2026-10-08T05:55:39Z.


What

Building the relinker currently configures SDL, FFmpeg, FreeType, Vulkan and the shader recompiler even when only executable conversion is needed. A checkout without initialized submodules cannot configure, and the unconditional GCC static-link flags prevent linking with AppleClang.

Add ANYPS5_RELINKER_ONLY=ON (default OFF). It configures only the standard-library relinker and its existing tests, before any third-party dependency is configured. Keep the progress-report regression available, omit GCC static-link flags on Apple hosts, and restrict the Linux x86-64 stub execution test to Linux. Document the conversion-only workflow and add Linux, Windows and macOS CI jobs that check out without submodules, build and run CTest.

This enables native Apple Silicon conversion tooling. Output remains x86-64 Linux ELF or Windows PE; system libraries and game execution still require a supported target environment. No game compatibility or performance improvement is claimed. The existing full-build Linux and Windows jobs remain in place.

Related: #1449 edits the same root CMake dependency setup. It is not a dependency; preserve the relinker-only early return when reconciling the two changes.

Tested

Review follow-up: rebased onto main 6b573862. A temporary merge with main bc1fbe81 configured and built in Release on macOS arm64 with AppleClang 17; CTest passed 30/30. The relinker source tree and standalone build configuration are unchanged between that tested merge and the latest rebase. Conventions and diff checks pass. Upstream CI still needs maintainer approval; no Linux/Windows CI success is claimed for the latest head.

macOS 26.1, arm64, AppleClang 17.0.0, CMake 4.4.4, Ninja 1.13.2:

  • Clean checkout, all third-party directories empty: configured and built the relinker plus its C++ test binaries; all 30 registered CTest groups passed on the tested merge with main. The latest branch is based on 6b573862.
  • Exact upstream source fails configuration without submodules even when passed ANYPS5_RELINKER_ONLY=ON; this branch succeeds.
  • BUILD_TESTING=OFF configures only relinker targets, with no runtime or third-party targets. ANYPS5_RELINKER_ONLY=OFF still enters the full-build dependency path and requires SDL.
  • With Python discovery disabled, configuration succeeds and the five C++ regression groups remain registered.
  • Workflow YAML parsing, actionlint 1.7.12, git diff --check and the repository conventions check passed.
cmake -S . -B build-relinker -G Ninja -DCMAKE_BUILD_TYPE=Release -DANYPS5_RELINKER_ONLY=ON -DBUILD_TESTING=ON
cmake --build build-relinker --parallel
ctest --test-dir build-relinker --output-on-failure --timeout 120

No commercial title or homebrew was executed. Native Windows/Linux output execution and the full runtime build were not tested locally; the new conversion-only matrix and existing full-build jobs cover those platforms in CI.

CI status at submission: upstream workflows report action_required and have not executed. The newly created fork does not yet expose its build workflow through the Actions API, so independent cloud validation remains pending.

Overlap checked against the current open-PR titles and descriptions. #921 changes dependency sourcing for the full build; #927 changes the macOS exception runtime; #1156 changes guest lifecycle ownership. None adds this build mode. No dependency on those changes.

Checklist

  • Based on current main; no other open PR implements the same build mode
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt; no code comments added
  • Unimplemented paths throw; no runtime exports or silent stubs changed
  • No notes, investigation files or images added to the repository
  • New third-party code is a submodule built from source; none added
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes; prepared with Codex, and the PR author is responsible for the submitted code
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4782483250 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1432). Originally posted by [ToyuAU](https://github.com/ToyuAU) on 2026-10-08T05:55:39Z. --- ### What Building the relinker currently configures SDL, FFmpeg, FreeType, Vulkan and the shader recompiler even when only executable conversion is needed. A checkout without initialized submodules cannot configure, and the unconditional GCC static-link flags prevent linking with AppleClang. Add `ANYPS5_RELINKER_ONLY=ON` (default OFF). It configures only the standard-library relinker and its existing tests, before any third-party dependency is configured. Keep the progress-report regression available, omit GCC static-link flags on Apple hosts, and restrict the Linux x86-64 stub execution test to Linux. Document the conversion-only workflow and add Linux, Windows and macOS CI jobs that check out without submodules, build and run CTest. This enables native Apple Silicon conversion tooling. Output remains x86-64 Linux ELF or Windows PE; system libraries and game execution still require a supported target environment. No game compatibility or performance improvement is claimed. The existing full-build Linux and Windows jobs remain in place. Related: #1449 edits the same root CMake dependency setup. It is not a dependency; preserve the relinker-only early return when reconciling the two changes. ### Tested Review follow-up: rebased onto main `6b573862`. A temporary merge with main `bc1fbe81` configured and built in Release on macOS arm64 with AppleClang 17; CTest passed 30/30. The relinker source tree and standalone build configuration are unchanged between that tested merge and the latest rebase. Conventions and diff checks pass. Upstream CI still needs maintainer approval; no Linux/Windows CI success is claimed for the latest head. macOS 26.1, arm64, AppleClang 17.0.0, CMake 4.4.4, Ninja 1.13.2: - Clean checkout, all third-party directories empty: configured and built the relinker plus its C++ test binaries; all 30 registered CTest groups passed on the tested merge with main. The latest branch is based on `6b573862`. - Exact upstream source fails configuration without submodules even when passed `ANYPS5_RELINKER_ONLY=ON`; this branch succeeds. - `BUILD_TESTING=OFF` configures only relinker targets, with no runtime or third-party targets. `ANYPS5_RELINKER_ONLY=OFF` still enters the full-build dependency path and requires SDL. - With Python discovery disabled, configuration succeeds and the five C++ regression groups remain registered. - Workflow YAML parsing, actionlint 1.7.12, `git diff --check` and the repository conventions check passed. ```sh cmake -S . -B build-relinker -G Ninja -DCMAKE_BUILD_TYPE=Release -DANYPS5_RELINKER_ONLY=ON -DBUILD_TESTING=ON cmake --build build-relinker --parallel ctest --test-dir build-relinker --output-on-failure --timeout 120 ``` No commercial title or homebrew was executed. Native Windows/Linux output execution and the full runtime build were not tested locally; the new conversion-only matrix and existing full-build jobs cover those platforms in CI. CI status at submission: upstream workflows report `action_required` and have not executed. The newly created fork does not yet expose its build workflow through the Actions API, so independent cloud validation remains pending. Overlap checked against the current open-PR titles and descriptions. #921 changes dependency sourcing for the full build; #927 changes the macOS exception runtime; #1156 changes guest lifecycle ownership. None adds this build mode. No dependency on those changes. ### Checklist - [x] Based on current `main`; no other open PR implements the same build mode - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt; no code comments added - [x] Unimplemented paths throw; no runtime exports or silent stubs changed - [x] No notes, investigation files or images added to the repository - [x] New third-party code is a submodule built from source; none added - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes; prepared with Codex, and the PR author is responsible for the submitted code
github-actions[bot] commented 2026-10-08 08:08:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-08T08:08:44Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#1461 CMakeLists.txt L75-82
#1462 CMakeLists.txt L75-82
#1499 .github/workflows/build.yml L22
#1542 CMakeLists.txt L75-82
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6055602190 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1432#issuecomment-6055602190). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-08T08:08:44Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | #1461 | `CMakeLists.txt` [L75-82](https://github.com/boykopovar/AnyPS5/blob/033a46360d7b9fbc247b17d333e8b5d94df3bc77/CMakeLists.txt#L75-L82) | | | | #1462 | `CMakeLists.txt` [L75-82](https://github.com/boykopovar/AnyPS5/blob/033a46360d7b9fbc247b17d333e8b5d94df3bc77/CMakeLists.txt#L75-L82) | | | | #1499 | `.github/workflows/build.yml` [L22](https://github.com/boykopovar/AnyPS5/blob/033a46360d7b9fbc247b17d333e8b5d94df3bc77/.github/workflows/build.yml#L22) | | | | #1542 | `CMakeLists.txt` [L75-82](https://github.com/boykopovar/AnyPS5/blob/033a46360d7b9fbc247b17d333e8b5d94df3bc77/CMakeLists.txt#L75-L82) | | |
adriadam10 commented 2026-10-08 13:43:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-08T13:43:49Z.


Checked: the relinker-only configure, build and ctest on Linux (36/36 pass, no SDL/FFmpeg/third-party target configured), and the full build + ctest on the merge with current main (457/457). The progress_report move before the early return doesn't change the full build. macOS/Windows are covered by the new relinker CI job; merging once it is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6061224200 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1432#issuecomment-6061224200). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-08T13:43:49Z. --- Checked: the relinker-only configure, build and ctest on Linux (36/36 pass, no SDL/FFmpeg/third-party target configured), and the full build + ctest on the merge with current `main` (457/457). The `progress_report` move before the early return doesn't change the full build. macOS/Windows are covered by the new `relinker` CI job; merging once it is green.
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!1432
No description provided.