Files
RedBear-OS/local
vasilito 872935057c llvm-native: pass LLVM_TABLEGEN/CLANG_TABLEGEN (not *_TABLEGEN_EXE)
Root cause of the native sub-build failure. A from-scratch LLVM build reads
the cache vars LLVM_TABLEGEN / CLANG_TABLEGEN to skip building a native
tblgen when cross-compiling (llvm/cmake/modules/TableGen.cmake: "Native
TableGen executable. Saves building one when cross-compiling"). The recipe
passed *_TABLEGEN_EXE, which that path does NOT read, so LLVM built its own
native tblgen via the CROSS_TOOLCHAIN_FLAGS_NATIVE sub-build. That native
build ran host gcc against Redox relibc headers (leaked via CMAKE_CXX_FLAGS)
and died on host/redox <stdlib.h> conflicts: __deprecated/__noreturn not a
type, duplicate div_t/ldiv_t. Passing the correct var names makes LLVM use the
redoxer toolchain's host tblgens (LLVM 21.1.2) and skip the native build.

lld21/clang21 build against a PREBUILT llvm and resolve tblgen via
find_program on their own LLVM_TABLEGEN_EXE cache var, so they stay correct.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-31 08:59:13 +09:00
..