Skip to content

ci: build the Switch core here, with CMake - #2465

Merged
flyinghead merged 1 commit into
flyinghead:masterfrom
WizzardSK:ci-libnx-cmake
Sep 4, 2026
Merged

ci: build the Switch core here, with CMake#2465
flyinghead merged 1 commit into
flyinghead:masterfrom
WizzardSK:ci-libnx-cmake

Conversation

@WizzardSK

Copy link
Copy Markdown
Contributor

The libretro Switch core on the buildbot still comes from the old libretro/flycast tree — that project's libretro-build-libnx-aarch64 job is green, and it is what publishes flycast_libretro_libnx.nro today. Here the job has been commented out since the CI file was written, because it extends .libretro-libnx-static-retroarch-master, which runs make -f Makefile platform=libnx, and this tree has no Makefile.

There is a CMake version of that template (libnx-static-cmake.yml), and the CMakeLists here already knows how to build for Switch: NINTENDO_SWITCH plus LIBRETRO gives a static library named flycast_libretro_libnx, with shell/switch on the include path and HAVE_LIBNX. The devkitPro Switch.cmake toolchain the template passes is what sets NINTENDO_SWITCH, so the two line up as they are.

So this just points the job at the CMake template and adds a .core-defs-libnx with -DLIBRETRO=ON -DUSE_OPENMP=OFF — no libcdio, and no OpenMP, matching what the Android defs do.

Preflight: built in the devkitpro/devkita64 container with exactly the cmake invocation the template uses (run) — 160 MB build/libnx/flycast_libretro_libnx.a, which is the file the template hands to the RetroArch static link. That last link step only exists on the buildbot, so it is the one part not covered here.

The libretro Switch core on the buildbot still comes from the old
libretro/flycast tree, because the job here was written against the
Makefile-based libnx-static template and this tree has no Makefile. There
is a CMake version of that template, and the CMakeLists already knows how
to build for Switch (NINTENDO_SWITCH + LIBRETRO produces
flycast_libretro_libnx), so point the job at that instead.
@flyinghead
flyinghead merged commit fd9d39b into flyinghead:master Sep 4, 2026
@WizzardSK
WizzardSK deleted the ci-libnx-cmake branch September 4, 2026 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants