mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-17 15:49:57 -04:00
Build the Linux kit against pinned Vulkan headers and without #embed, and try the compiler before the long steps.
A player's AppImage build of 0.7.1 stopped in its compile step after eight minutes of RomFS work: four files did not compile, because the kit builds with the system's compiler and headers and theirs were older than the runtime needs. vk_pipeline.c and vk_device.c name VK_KHR_pipeline_binary, VK_KHR_dynamic_rendering_local_read and VK_KHR_shader_maximal_reconvergence, which their Vulkan headers did not declare, and ui/menu.cpp takes its font in with #embed, which clang has from version 19. - Vulkan headers: tools/vulkan_pin.py holds the release the other builds use (1.4.363, the archive and hash tools/make_release_linux.py already pinned, which now reads them from there). The AppImage carries its C headers in toolchain/vulkan-headers and builds against them whatever the system has; a kit or a source checkout uses the system's when they are at least that release and fetches the pinned ones otherwise (build_game.py vulkan_include). Their folder goes first on the include path of the runtime's sources only, so the lifted code's objects keep their keys, and a runtime object compiled before against the system's headers is taken over instead of compiled again. AppRun no longer asks for the system's Vulkan headers. - #embed: tools/build_shaders.py also writes the font's bytes as runtime/ui/roboto_ttf.h (ignored by git, carried by a kit), and menu.cpp includes that where the compiler has no __has_embed. With #embed nothing changes. - Before its long steps a Linux build that will compile now checks every runtime source that needs no header of the install with the compile step's own command (clang -fsyntax-only) and links an empty program against the game's libraries (make_game.py preflight): an old compiler, an old header or a missing development package stops it in the first seconds with the compiler's own errors. A failed compile names every file that failed, not only the three whose errors it prints. Checked on Windows: tests/launcher_test.py passes with four new tests (117); the header of bytes and #embed give the same 162,588 bytes, and both branches of menu.cpp compile; the early check passes on the Windows file set with clang 23 and stops on files made to fail; the 34 local headers of release 363 are the upstream tag's files by git blob id. Not run: anything on Linux, the pinned archive's download, a compiler older than 23. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -40,6 +40,7 @@ from pathlib import Path
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
||||
import build_game # noqa: E402
|
||||
import make_release as mr # noqa: E402
|
||||
import vulkan_pin # noqa: E402
|
||||
|
||||
ROOT = mr.ROOT
|
||||
MAIN_ROOT = mr.MAIN_ROOT
|
||||
@@ -69,8 +70,7 @@ PINS = {
|
||||
'5749cbc4e668273514150a80e387a957f933c6ed3f5f11e03fb30955e2bbead6'),
|
||||
'zstd-src': ('https://github.com/facebook/zstd/releases/download/v1.5.7/zstd-1.5.7.tar.gz',
|
||||
'eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3'),
|
||||
'vulkan-headers-src': ('https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/v1.4.363.tar.gz',
|
||||
'cbaf687d3c59b9666fe080e7f8396b6b4f4d344a768ee6b337c59852f4526b68'),
|
||||
'vulkan-headers-src': vulkan_pin.SOURCE, # the release a build with the system's headers takes too
|
||||
'vma-header': build_game.VMA_FETCH,
|
||||
# appimagetool and the type-2 runtime from release tags, not "continuous", whose uploads change under the same
|
||||
# URL and would stop the build at the hash check
|
||||
@@ -169,8 +169,8 @@ def build_deps(out, llvm, sysroot):
|
||||
d = out / 'runtime' / 'deps'
|
||||
(d / 'include' / 'vma').mkdir(parents=True, exist_ok=True)
|
||||
(d / 'lib').mkdir(parents=True, exist_ok=True)
|
||||
vk = tar_extract('vulkan-headers-src', WORK / 'vulkan-headers', ['Vulkan-Headers-1.4.363/include',
|
||||
'Vulkan-Headers-1.4.363/LICENSE.md'], strip=1)
|
||||
vk = tar_extract('vulkan-headers-src', WORK / 'vulkan-headers', [f'{vulkan_pin.TOP}include',
|
||||
f'{vulkan_pin.TOP}LICENSE.md'], strip=1)
|
||||
for sub in ('vulkan', 'vk_video'):
|
||||
shutil.copytree(vk / 'include' / sub, d / 'include' / sub)
|
||||
shutil.copy2(mr.fetch('vma-header'), d / 'include' / 'vma' / 'vk_mem_alloc.h')
|
||||
|
||||
Reference in New Issue
Block a user