Repository navigation
feat(windows): cross-build the x64 program on a Mac or Linux - #3
Merged
Merged
Conversation
…m-mingw and pinned MSYS2 LLVM packages
…n the zip's place
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Cross-builds the x86-64 Windows program on a Mac or Linux, with no Windows and no MSYS2:
The release workflow keeps building and shipping the MSYS2 build. This adds a second way to make the same program, and a CI check that it keeps working.
How it works
runtime/win/x64/cross/setup-sysroot.shunpacks the MSYS2 CLANG64 packages pinned inmsys2-sysroot.txt(the same versions asmsys2-clang64.txt, each with its SHA-256) into a folder: LLVM 23's headers, CMake package and import library for Windows, and the DLLs the program ships with.build-scarletnx.shcross-builds ScarletNX's recompiler library (same pinned commit, same patch) with llvm-mingw, using ScarletNX's own Windows cross-build support and the sysroot's LLVM CMake package.build-x64.shtakes the tools from llvm-mingw whenX64_CROSS_SYSROOTis set. The program's own C++ (the dark mode shim) links libc++ and libunwind statically, so it imports onlylibLLVM-23.dllandlibwinpthread-1.dllbesides Windows' own DLLs, and the process has one libc++ DLL.collect-dlls.shnow fails when a program imports alib*.dllit cannot find. The first cross-built link importedlibunwind.dll, which the script skipped without a word.runtime/win/build-x64-cross.shruns the steps and leaves the program and its DLLs wherepackage-zip.shandbuild-installer.shalready look.windows-x64-crossbuilds it on a macOS runner, andsmoke-x64-crossstarts it twice in the MSYS2 zip's place, like the existing smoke test. Neither is a dependency ofpublish, so a failure shows in the run without holding a release back.Tested
smoke-x64-cross): the first start translates and draws the Welcome screen, the second finds the translation and draws it again, both matching the baseline.Not covered