Repository navigation
make_game, clang-cl-xwin: require Vulkan headers in Linux cross-build preflight - #7142
SkippySteve wants to merge 2 commits into
Conversation
…uild preflight Co-authored-by: Cursor <cursoragent@cursor.com>
|
Tested
The Linux |
|
Tested
Not covered here: the Linux clang-cl + xwin cross-build itself (the skipped cases); this only checks the change is neutral on a native Windows checkout. AI-assisted (Claude Code). |
|
AI-assisted independent review of
These are mocked Python checks and source comparisons. Native Linux cross-configure was unavailable in this run. |
An explicit LEONIDA_VULKAN_HEADERS_FETCH=0/OFF now overrides a cached ON in both the preflight and the configure (-DLEONIDA_VULKAN_HEADERS_FETCH=OFF is passed). The preflight no longer accepts VulkanHeaders_SOURCE_DIR, and only accepts a FETCHCONTENT_SOURCE_DIR_VULKANHEADERS that is a Vulkan-Headers CMake project. The toolchain drops a cached custom Vulkan_INCLUDE_DIR without vulkan/vulkan.h, so a valid SDK or host include that passed the preflight is used instead.
|
Thanks @wasonidas, all three were real. Fixed in
New tests cover each case: env OFF over cached ON, the |
|
Thanks for the earlier Windows checks on |
|
Tested
AI-assisted (Claude Code), no game files. |
|
Tested 5944878 merged with current main (merges cleanly) on real Linux: Ubuntu 24.04, Python 3.12.3, CMake 3.28, clang-cl 19.1.1 + xwin 0.10.0 SDK. This machine has no
AI-assisted (Claude Code). |
|
Tested 5944878 on Windows 11, Python 3.15.2, NVIDIA RTX 4060 Ti (driver 621.24; CPU-only checks, no game files, no GPU/llvm-mc/MSVC used): pass. Ran the test files this PR adds or changes, from a clean checkout of the PR head: AI-assisted (Claude Code). |
Claimed in the coordination issue as: #6910 (comment)
What and why
On Linux with
clang-cland anxwinSDK installed but without host Vulkan headers (/usr/include/vulkan/vulkan.h),make_game.py --stages runtime(and default stages) currently passes preflight, configuresruntime/without-DLEONIDA_REQUIRE_VULKAN=ON, receives only aCMake Warning, and silently compiles and packagesgta6rt.exewithoutLEONIDA_VULKAN_DEVICE— even thoughgta6rt.shdefaults toLEONIDA_D3D12=vulkan.Changes:
make_game.py:cross_build_missing()checks for Vulkan headers (cross_vulkan_headers_ready()), accepting/usr/include/vulkan/vulkan.h,/usr/local/include/vulkan/vulkan.h,VULKAN_SDK(Include/orinclude/),LEONIDA_VULKAN_HEADERS_FETCH=1(or CMake truthy values), or an existingruntime/build/windows/CMakeCache.txtwith usableVulkan_INCLUDE_DIR,LEONIDA_VULKAN_HEADERS_FETCH, orFETCHCONTENT_SOURCE_DIR_VULKANHEADERS/VulkanHeaders_SOURCE_DIR.cross_configure()always passes-DLEONIDA_REQUIRE_VULKAN=ONsomake_game.py --stages runtimecan never silently build withoutLEONIDA_VULKAN_DEVICE, and forwards-DLEONIDA_VULKAN_HEADERS_FETCH=ONwhenLEONIDA_VULKAN_HEADERS_FETCHis truthy in the environment.runtime/cmake/clang-cl-xwin.cmake:$ENV{VULKAN_SDK}/Includeand$ENV{VULKAN_SDK}/includebefore/usr/includeand/usr/local/includewhen populating${CMAKE_BINARY_DIR}/xwin-vulkan-include(refreshing thevulkanandvk_videosymlinks without exposing sibling host libc headers).FORCEonset(Vulkan_INCLUDE_DIR ... CACHE PATH ... FORCE)so a staleVulkan_INCLUDE_DIR-NOTFOUNDcache entry recovers on reconfigure once headers orVULKAN_SDKare provided (explicit-DVulkan_INCLUDE_DIR=...values remain untouched).docs/testing.md: documents the Linux cross-build Vulkan-header requirement andLEONIDA_VULKAN_HEADERS_FETCH=1.tests/test_make_game_platform.py&tests/test_cmake_vulkan_missing.py: synthetic-only regression tests forcross_build_missing(),cross_configure(), andclang-cl-xwin.cmake(cmake -P).Tested
Linux (Omarchy/Arch, Python 3.14, CMake, clang-cl 23.1.3 + xwin SDK, no
/usr/include/vulkan/vulkan.h), synthetic fixtures only, no game files or GPU:python3 -I tests/test_make_game_platform.py: 47/47 OK (fails onmain: 5 failures, 10 errors).python3 -I tests/test_cmake_vulkan_missing.py: 8/8 OK (fails onmain: 2 failures).tests/test_docs_env_vars.py,tests/test_docs_cli_flags.py,tests/test_docs_links.py,tests/test_docs_repo_paths.py,tests/test_docs_repeated_lines.py,tests/test_docs_table_rows.py, and all othertests/test_make_game_*.py(excepttest_make_game_resume.py, already broken onmainper Coordinating who works on what (40) (moved to #7049) #6910): all OK.python3 -m compileall -q make_game.py testsandgit diff --check: clean.runtime/in a temp dir:-DLEONIDA_REQUIRE_VULKAN=ON: exits 1 withCMake Error: Vulkan headers not found.Vulkan_INCLUDE_DIR-NOTFOUND) with a syntheticVULKAN_SDK: exits 0, updatesVulkan_INCLUDE_DIRto<build>/xwin-vulkan-include, and generatesbuild.ninjadefiningLEONIDA_VULKAN_DEVICE.AI-assisted: yes (Gemini 4 Neon)
Checklist
docs/design.md, with how it was confirmed. (N/A — build preflight / toolchain only)