Crafter.Build/interfaces
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jorijn van der Graaf fdba70d176
fix(cuda): look for nvcc instead of leaving it to PATH
cfg.cuda compiled with a bare "nvcc", which the shell looked up on PATH.
In crafter-build's Flatpak PATH is /app/bin:/usr/bin, as its manifest
sets it, which never holds the host's toolkit, so with it every build
with CUDA sources stopped at "sh: line 1: nvcc: command not found",
although the sandbox sees /opt/cuda through --filesystem=host.

ResolveToolchain now finds nvcc as it finds clang++: CUDA_PATH, which is
exclusive as CRAFTER_BUILD_LLVM_DIR is, else /opt/cuda (Arch's package)
or /usr/local/cuda (NVIDIA's installer and packages), else the absolute
entries of PATH, which it searches itself so that a build without a
toolkit can say where it looked. A relative CUDA_PATH is made absolute
there, once, as CRAFTER_MINGW_DIR is, since nvcc runs later from
whatever working directory a build is in. The sandbox shows the host's
/usr and /etc under /run/host, with its own runtime at /usr, and
NVIDIA's /usr/local/cuda is a link, to /usr/local/cuda-<version> or
through /etc/alternatives. A link to an absolute path names a path of
the host, /opt/cuda pointing at /usr/local/cuda-<version> too, and the
sandbox would look it up in its own root, so where the path of a
toolkit, CUDA_PATH, /opt/cuda or /usr/local/cuda, is such a link,
HostPath follows it, and the link its target is in turn, each taken as
the host's; a link partway along that path, or inside the toolkit, is
the kernel's to resolve, in the sandbox's root.

A missing toolkit is reported by the build that has a .cu to compile and
not by GetToolchain(), so no other build fails for want of one.
crafter-build --version prints the nvcc it found, whether or not the
compiler could be resolved.
2026-11-11 19:34:52 +01:00
..
Crafter.Build-Agents.cppm feat(agents): write AGENTS.md from a tracked AGENTS.template.md 2026-10-31 16:53:42 +01:00
Crafter.Build-Asset.cppm refactor: drop Windows host support 2026-10-02 22:03:34 +02:00
Crafter.Build-Clang.cppm feat: install and bundle a Flatpak through the host's flatpak 2026-11-09 01:55:31 +01:00
Crafter.Build-External.cppm refactor: carry run paths as directories, not -Wl,-rpath flags 2026-11-07 19:24:12 +01:00
Crafter.Build-Flatpak.cppm feat: install a Flatpak's data under /app/share 2026-11-09 01:55:31 +01:00
Crafter.Build-Implementation.cppm refactor: drop Windows host support 2026-10-02 22:03:34 +02:00
Crafter.Build-Interface.cppm refactor: drop Windows host support 2026-10-02 22:03:34 +02:00
Crafter.Build-Lint.cppm refactor: drop Windows host support 2026-10-02 22:03:34 +02:00
Crafter.Build-Platform.cppm feat: install and bundle a Flatpak through the host's flatpak 2026-11-09 01:55:31 +01:00
Crafter.Build-Progress.cppm refactor: drop Windows host support 2026-10-02 22:03:34 +02:00
Crafter.Build-Script.cppm feat(script): scripts in project.cpp, run with crafter-build run 2026-10-20 19:08:26 +02:00
Crafter.Build-Shader.cppm fix: rebuild and relink on what changed, submodules at their revisions, and mingw found where it is 2026-10-20 20:20:29 +02:00
Crafter.Build-Test.cppm feat: lay an executable out as the files/ of a Flatpak 2026-11-08 22:48:42 +01:00
Crafter.Build-Toolchain.cppm fix(cuda): look for nvcc instead of leaving it to PATH 2026-11-11 19:34:52 +01:00
Crafter.Build.cppm feat: lay an executable out as the files/ of a Flatpak 2026-11-08 22:48:42 +01:00