Build the runtime library and refresh installed tools correctly on Linux.

Use the native toolchain and archiver for runtime libraries, accept VMA_INCLUDE, and report missing Linux tools before compiling. Read the host CPU through compiler wrappers without changing the environment used by real compiles.

Compare copied tools by content rather than normalized timestamps, then replace them atomically so read-only POSIX installs can update without changing executable modes. Cover equal-metadata copies and translator refresh during shader preparation, and correct the patch-application comment.
This commit is contained in:
Chris Toph
2026-11-09 19:48:29 -05:00
committed by chrg6
parent d8ea169fcb
commit 6dd69eadbf
3 changed files with 66 additions and 21 deletions

View File

@@ -103,9 +103,8 @@ def prepare_sources() -> Path:
sys.exit(f"expected 37 patches, found {len(patches)}")
# build/xlate is inside this checkout, and git inside a repository reads a "diff --git" patch's paths from the
# repository's top: those hunks fall outside the directory handed to --directory, git skips every file of the patch
# and still exits 0. 0021-prmt-byte-permute.patch is the only one written in that form, so it used to be skipped in
# silence and every byte permute stayed a no-op. GIT_CEILING_DIRECTORIES stops git from walking up to the checkout,
# so it reads the patch as it would outside a repository, and a "Skipped patch" line fails the build.
# and still exits 0. GIT_CEILING_DIRECTORIES stops git from walking up to the checkout, so it reads each patch as it
# would outside a repository, and a "Skipped patch" line fails the build (including 0021's PRMT implementation).
env = dict(os.environ, GIT_CEILING_DIRECTORIES=str(BUILD.parent), LC_ALL="C")
for patch in patches:
for extra in (["--check"], []):