libclc: depend on llvm-native.runtime for the host clang (build-only)
The host build works and staged llvm-native's .dev (static libs + cmake) so find_package(LLVM) now resolves — but the host clang binaries live in llvm-native's .runtime subpackage, which libclc didn't pull. The .dev -> .runtime package link does NOT transitively stage at build time, so libclc errored 'host clang not found under .../sysroot/usr/bin'. Move the entire host toolchain to dev-dependencies (build-only; libclc's shipped artifact is the .bc/.pc files, never clang) and add llvm-native.runtime explicitly so usr/bin/clang* is staged.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user