gitlab-ci: build the Switch core's combined archive - #2471
Conversation
The libnx template builds --target ${CORENAME}_libretro, and on Switch that
target is flycast's own objects and nothing else - 251 members. The
dependencies (xxhash, chdr, zip, elf, the resources) are folded in by the
"combined" target that CMakeLists.txt defines for exactly this case, and
that is the archive RetroArch has to link: 409 members.
So the job takes the template's script with that one word changed.
Checked on a devkitA64 container, configuring the way the template does:
--target flycast_libretro gives 251 members / 160 MB, with no chd.o,
xxhash.o or zip_*.o in it; --target combined gives 409 / 171 MB, with them.
|
One thing worth knowing: the merge commit carries |
|
Sorry about that. I didn't want to trigger a build since this file isn't used here. |
|
Sorry, I looks like a misunderstanding. My intention was to move the switch build from this project https://github.com/libretro/flycast to your project because I believe this project is more mature and up to date than that old switch-only fork. |
|
There is indeed some misunderstanding. |
|
That matches my understanding, and it is the reason the PR came here rather than to libretro: the buildbot builds this repository. The recipe in If you would rather not carry libretro's CI quirks in this repo at all, there is a cleaner version of this particular fix: move the |
Follow-up to #2465: the Switch job builds, but the archive it hands to RetroArch is incomplete.
The libnx template runs
cmake --build $BUILD_DIR --target ${CORENAME}_libretro, and on Switch that target is flycast's own objects and nothing else. The dependencies — xxhash, chdr, zip, elf and the resources — are folded in by thecombinedtarget thatCMakeLists.txtdefines for exactly this case:ALLmeans a plaincmake --buildgets it; naming a single target does not. So the job takes the template's script with that one word changed.Measured on a devkitA64 container, configuring exactly the way the template does:
chd.o/xxhash.o/zip_*.oflycast_libretrocombinedThe run builds the first, checks the archive, then builds the second and checks again.
Without this,
make -f Makefile.libnxinretroarch-precompiledlinks against 158 missing objects.The alternative would be to move the
combinedcommands into aPOST_BUILDstep on the library target, so that buildingflycast_libretroalways produces the complete archive and no CI knows about it — happy to do that instead if you prefer it.