Build the runtime's shader headers before make_game.py compiles, so a source checkout builds again.

tools/make_game.py has its own compile step and did not build runtime/*_spv.h, which the repository
no longer holds: from a source checkout (the Linux path of docs/README-BuildKit.md) every runtime file
that includes one failed to compile. A kit carries the headers built, so nothing is stale there and no
shader compiler is looked for.

Pull request #405 by mooki000, taken as it is. Not run on Linux here.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-10 06:16:58 -05:00
parent b6beb72c8d
commit 32901bb337
2 changed files with 11 additions and 1 deletions

View File

@@ -1199,6 +1199,14 @@ def step_compile(out, cache_dir, msys, jobs, romfs_job=None, update=False):
gen.mkdir(parents=True, exist_ok=True)
obj.mkdir(parents=True, exist_ok=True)
rt = KIT / 'runtime'
# The runtime's own shaders are in the repository as source only: from a source checkout their headers are not
# there until they are built, and every runtime file that includes one would fail to compile. A kit carries them
# built, so nothing is stale there and no shader compiler is looked for.
import build_shaders
stale = build_shaders.stale(rt)
if stale:
say(f' compiling {len(stale)} of the runtime\'s own shaders (runtime/*_spv.h)')
build_shaders.build(rt, stale)
clang, clangxx, env, vma = toolchain(msys)
if not romfs_job:
romfs_index(out, gen)