llvm-native: LLVM_USE_HOST_TOOLS=OFF to kill the native sub-build
redbear-ci / check (push) Has been cancelled
redbear-ci / check (push) Has been cancelled
Even with LLVM_TABLEGEN/CLANG_TABLEGEN provided, LLVM_USE_HOST_TOOLS defaults ON when cross-compiling, so llvm/CMakeLists.txt creates the NATIVE external project (llvm_create_cross_target LLVM NATIVE) — a full second HOST LLVM build that inherits the Redox cross flags and died compiling native llvm-config. We already supply the only native tools a cross-build needs (the tablegens), so OFF eliminates the native sub-build entirely; LLVM uses the provided host tblgens for .inc generation. Completes the llvm-native cross-build fix chain (native-link, OPTIMIZED_TABLEGEN, LLVM_TABLEGEN var name, and now this). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -98,6 +98,15 @@ COOKBOOK_CMAKE_FLAGS+=(
|
||||
# LLVM 21.1.2). LLVM_OPTIMIZED_TABLEGEN=On would build a second optimized
|
||||
# native tblgen instead of using them. Off => LLVM uses what we provide.
|
||||
-DLLVM_OPTIMIZED_TABLEGEN=Off
|
||||
# OFF is REQUIRED here. LLVM_USE_HOST_TOOLS defaults ON when cross-compiling
|
||||
# and makes llvm/CMakeLists.txt create the NATIVE external project
|
||||
# (llvm_create_cross_target LLVM NATIVE), a full second host LLVM build that
|
||||
# inherits the Redox cross flags and dies compiling native llvm-config/etc.
|
||||
# We already supply host-runnable, version-matched tblgens via
|
||||
# LLVM_TABLEGEN/CLANG_TABLEGEN (the only native tools a cross-build needs),
|
||||
# so the NATIVE project is pure waste. OFF => no native sub-build; LLVM uses
|
||||
# the provided tblgens for .inc generation.
|
||||
-DLLVM_USE_HOST_TOOLS=OFF
|
||||
-DLLVM_TARGET_ARCH=$ARCH
|
||||
-DLLVM_TOOLS_INSTALL_DIR=bin
|
||||
-DLLVM_UTILS_INSTALL_DIR=bin
|
||||
|
||||
Reference in New Issue
Block a user