diff --git a/local/recipes/dev/libclc/recipe.toml b/local/recipes/dev/libclc/recipe.toml index 46c8c47566..c2b51013fc 100644 --- a/local/recipes/dev/libclc/recipe.toml +++ b/local/recipes/dev/libclc/recipe.toml @@ -26,16 +26,25 @@ template = "custom" # WRONG LLVM (its cmake/libs target Redox, not the host). # # llvm-native is exactly the missing piece: a native (host) LLVM/Clang/LLD 21 -# build (same redox-2025-10-03 revision as llvm21/clang21) whose .dev package -# ships usr/lib/cmake/llvm/**, libLLVM*.a and host clang/llvm-* binaries. We -# depend on it ALONE for the host toolchain — pulling in llvm21.dev too would -# stage a SECOND, conflicting usr/lib/cmake/llvm (the cross one) into the same -# sysroot path, and find_package would non-deterministically pick the wrong one. -dependencies = [ - "llvm-native", -] +# build (same redox-2025-10-03 revision as llvm21/clang21). Its packages split +# as: main = leftover host tools (diagtool, lli, FileCheck, cc/c++ …); +# .dev = usr/lib/cmake/llvm/**, host libLLVM*.a + includes (for find_package); +# .runtime = usr/bin/clang*, usr/bin/lld*, usr/bin/llvm-*, libLLVM*.so +# (the host CLANG libclc RUNS to compile the OpenCL-C builtins to bitcode). +# +# ALL of it is BUILD-ONLY: libclc's shipped artifact is the .bc/.pc files that +# Mesa consumes at runtime, never clang. So the whole host toolchain goes in +# dev-dependencies (staged into the build sysroot, NOT pulled into the image). +# We must include .runtime explicitly — the .dev -> .runtime package link does +# NOT transitively stage .runtime at build time, so without it the host clang +# is absent and the build errors "host clang not found". We deliberately do NOT +# pull llvm21.dev (the Redox-cross LLVM) — it would drop a SECOND, conflicting +# usr/lib/cmake/llvm into the sysroot and find_package would pick the wrong one. +dependencies = [] dev-dependencies = [ + "llvm-native", "llvm-native.dev", + "llvm-native.runtime", ] script = ''' DYNAMIC_INIT