build(windows): the builder no longer downloads emsdk, which the Windows build never uses #1620
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!1620
Loading…
Reference in a new issue
No description provided.
Delete branch "TrashPanda/Longshot:build/windows-no-emsdk"
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?
Type: build · Risk: low · Tested on: Linux (cross build for Windows), game-free checks · Needs: Windows, any GPU: a fresh builder install and a build
TL;DR
Every Windows install of Longshot downloads a 115 MiB compiler package (emsdk) that the Windows build never uses: the builder compiles everything with its own llvm-mingw. This PR stops downloading it. Each new Windows install, and each launcher update that brings a new tools set, saves 115 MiB of download (29% of the Windows tools) and 286 MiB unpacked. That helps most on slow connections and small disks. A new check shows that every tool the build looks up comes from llvm-mingw. The renderer cross-builds for Windows with an emsdk folder that is empty.
Breakdown
RX_CPMand no longerEMSDK.WindowsCompileris llvm-mingw and cpm already), the Linux tools (theiremsdkis the AppImage's LLVM and stays), and the Visual Studio route (LONGSHOT_MSVC=1) for developers, which still finds emsdk atC:\emsdkorEMSDK.main, passes here),tests/run_all.py(no new failures), and the Windows renderer DLL cross-built from Linux with llvm-mingw and an emptyEMSDK: compiled and linked.Why
The Windows builder has bundled llvm-mingw since it stopped needing Visual Studio, and
nx2/make_game.pybundled_mingwalways points the build at it. WithLONGSHOT_MINGWset,third_party/a64-kit/tools/toolchain.pyfindtakes clang, clang++, lld and everyllvm-*tool from llvm-mingw'sbinbefore it ever looks inEMSDK. The emsdk that tools.lock still lists for Windows (hookshot-v2.1.0, 120,100,315 bytes zipped) is a leftover of Hookshot's builder, and every Windows install downloads it, checks it and unpacks it for nothing.Found in a code audit of build and download size for players on modest PCs and connections. No issue asks for this; the tracker, the team room and Hookshot's pull requests were searched (emsdk, llvm-mingw, tools.lock): nothing found.
What changed
The Windows lines of tools.lock lose emsdk, and nothing that sets up or runs the Windows build expects it any more. A new check holds that in place.
tool emsdk hookshot-v2.1.0 windows-x64 ...line is gone; the header says why.scripts/tools.pyREQUIRED["windows-x64"]no longer lists it, so the release workflow'scheck --requiredoes not ask for it.RX_CPMfrom its tools folder and no longerEMSDK.scripts/dev_build.pyWINDOWS_TOOL_ENVfollows it (it stopped a Windows dev build when the folder was missing).builder/setup/setup.c's comment no longer lists emsdk.nx2,scripts,builder, the a64-kit'stools) for everyfind("<tool>")and checks each is in llvm-mingw 20261104'sbin(listed from the release zip; the check says to list it again when tools.lock bumps llvm-mingw). Then it runstoolchain.findfor each withRX_TARGET=windows, a made-up llvm-mingw and anEMSDKthat holds nothing, and expects llvm-mingw's every time. It fails onmain(the lock's Windows emsdk) and passes here. The tools found today: clang, clang++, lld, llvm-cxxfilt, llvm-profdata.EMSDK).The LongshotLauncher needs no change: it installs what tools.lock lists, sets
EMSDKonly when anemsdkfolder is there (Core/MakeGameCommand.cs), and its Windows shader-cache key is llvm-mingw and cpm already (Core/ShaderCaches.csWindowsCompiler).Measurements
Verdict: it helps: a fresh Windows install downloads 115 MiB less (413.5 MB down to 293.4 MB of tools, -29%) and keeps 286 MiB less on disk; the build is unchanged (the same compiler, llvm-mingw's).
Hardware: Linux, AMD Zen 5 CPU (a download and build-tools change: no GPU involved)
Scene: none (no game run: the game's code and flags are unchanged)
Method: the sizes from tools.lock and the release zip; the unpacked size from the zip's index; the build with
RX_TARGET=windowsand an emptyEMSDKHow to reproduce:
python -I -B tests/test_windows_toolchain.py; the cross build command under Testing4408ce0de784c0d4Flags and settings
None: no switch, menu row, ini key or build flag changes. The builder stops setting the
EMSDKenvironment variable for the Windows build, which only the Visual Studio route reads.Testing
Tested: Linux (Zen 5), no game run: the game's code, flags and compiler are unchanged, and the change is the Windows builder's download list.
python -I -B tests/test_windows_toolchain.py: passes here, fails onmainfor the reason above.python -I -B tests/run_all.py(rebased on876dc360, the 4 checks this PR touches re-run after the rebase onto4408ce0d): 646 passed, 34 failed, 101 skipped. The same 34 fail onmain876dc360(run with--exacton a clean checkout). They come from this PC (a .nup that is not a complete dump, missing packages) and none reads a file this PR changes: test_bug_report_defaults, test_cpu_report, test_crt_options, test_damage_debug_menu, test_dev_packs, test_discover, test_display_startup_failure, test_dlss_feature_size, test_failed_compile_keeps_objects, test_guest_imported, test_hud_layout_row, test_invalidate_quick, test_invalidate_vcore, test_libc_hooks, test_lift_lookups, test_linux_pressure, test_linux_preflight, test_linux_update, test_log_open_failure, test_mirror_budget, test_missing_nup, test_mods_size_table, test_pending_guest_import, test_pipeline_play_cache, test_present_thread, test_profiling_mode, test_psychov35_fsr3_fg, test_readback_timeout_source, test_run_all_changed, test_slow_frames, test_switch_table, test_upscaler_rows, test_walk, test_walk_key. The 101 skipped lack the Vulkan or SPIR-V headers or numpy on the runner's path, or are Windows only.EMSDKset to an empty folder: 210 files compiled,longshot_vk.dlllinked (log above).Not tested: a native Windows build from a fresh builder install of this branch's tools: this PC has no Windows. The Windows code paths are the same ones the cross build takes (
toolchain.findwithLONGSHOT_MINGW), andbundled_mingwsets that on every Windows build that is notLONGSHOT_MSVC=1.Must be tested:
emsdkfolder underLongshotBuilder/tools, the build to finish as onmain, and the game to start (Test Farm: @Beanstalk windows, a fresh builder install of this PR and a full build, no emsdk in the tools folder).Risks
What could break: a Windows build path that still looks up a tool llvm-mingw lacks would stop with "No C compiler was found". The new check fails as soon as the build's Python looks up such a tool. One case is left: a builder whose
llvm-mingwfolder is missing entirely and that is notLONGSHOT_MSVC=1fell back to the Visual Studio route before. It failed there for players anyway ("The Windows SDK was not found"), and it now fails one step earlier with the missing-compiler message.Turning it off: revert the commit (the emsdk package version stays in the organization's Packages, unchanged).
Compatibility: older installed versions keep their own emsdk folder; a new version's tools no longer include one. Shader and pipeline caches are not affected: the launcher's Windows compiler key is llvm-mingw and cpm, unchanged. Nothing changes for saves, options or the vk ABI.
Checklist
Everyone
type(scope): description) of the status line's type.can't be run by hand is in Testing's Not testable by hand, with why.
in Risks.
main.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named).third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.tests/that reads changed source updated in this PR, not weakened.🤖 Generated with Claude Code
@Beanstalk windows, any GPU: install the Longshot Builder from this PR's tools.lock into a fresh folder, with no other Longshot version beside it (so no emsdk is taken from one), then build the game and start it. Expected: no emsdk folder under LongshotBuilder/tools, the build finishes as it does on main, and the game starts to its title screen.
@TrashPanda only members of
BigBeanscan start the farm. One of them can approve this request by reacting 👍 to it or to this comment.WIP: build(windows): the builder no longer downloads emsdk, which the Windows build never usesto build(windows): the builder no longer downloads emsdk, which the Windows build never usesmooki referenced this pull request2026-11-18 20:12:19 +00:00