Files
RedBear-OS/local
vasilito 0a9e3116f4 libclc: fix native host-build toolchain wiring (4 layers; 1 structural gap remains)
The native (host) libclc build was broken at multiple layers; fixed:
1. native_libclc.cmake used literal ${COOKBOOK_SYSROOT} in a single-quoted
   heredoc -> CMake saw it empty -> /bin/clang-21. Use $ENV{...} so CMake reads
   the env at configure time.
2. Pointed the host compiler at the SYSROOT clang (a Redox-target binary, can't
   run on the host). Use $ENV{COOKBOOK_TOOLCHAIN}/bin/clang-21 (host clang,
   defaults to x86_64-unknown-linux-gnu).
3. The cross-env restore (LDFLAGS with Redox -L paths + --static) ran BEFORE the
   native cmake/ninja, polluting the host link. Moved it to AFTER the build.
4. -DLLVM_DIR overrode the toolchain file with the Redox sysroot LLVM. Point it
   at ${COOKBOOK_TOOLCHAIN}.

Compiler detection now passes ('skipped'/OK). REMAINING structural blocker:
find_package(LLVM) loads the toolchain's LLVMExports.cmake but that references
LLVM dev files not shipped in the runtime toolchain -> needs a complete HOST
LLVM dev tree (llvm21 host dev output) for the libclc host build.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 12:42:49 +09:00
..