build(macos): configure the full build for x86-64 under Rosetta #4626
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4626"
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 mugurc on 2026-10-12T17:03:03Z.
What
Configures the full build on macOS for x86-64. The libraries are x86-64 code that Rosetta 2 runs on Apple silicon, so the full build selects the architecture itself instead of asking the user for flags:
CMAKE_OSX_ARCHITECTURESandCMAKE_APPLE_SILICON_PROCESSORdefault tox86_64(cache entries, an explicit value wins). Configuring the full build for another architecture fails with an error.-fexperimental-library: Apple clang's libc++ needs it for C++20 library features the sources use.$ORIGIN, so on macOS it is@loader_path; the other platforms keep$ORIGIN.The relinker-only build is unchanged. This is the first pull request of the macOS series announced on #1 (https://github.com/boykopovar/AnyPS5/issues/1#issuecomment-6124344298); the build does not complete until the following ones are in.
Tested
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ONwith no architecture flag configures for x86_64 (CMAKE_OSX_ARCHITECTURES=x86_64in the cache,-fexperimental-libraryin the generatedbuild.ninja,-DCMAKE_OSX_ARCHITECTURES=x86_64in the libjpeg-turbo configure command,@loader_pathin the link flags of the prx libraries).-DCMAKE_OSX_ARCHITECTURES=arm64fails with the new error.-DANYPS5_RELINKER_ONLY=ONleaves the cache entries empty and adds no flag.main33ae282e4), run on my fork: 960 tests on Linux and 966 on Windows pass (https://github.com/mugurc/AnyPS5/actions/runs/38256280627). Every addition is insideAPPLE/CMAKE_HOST_APPLE; the Linux and Windows value of the run path is still$ORIGIN.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)