diff --git a/local/recipes/dev/llvm-native/recipe.toml b/local/recipes/dev/llvm-native/recipe.toml index 42b6f9298a..7c498da9fc 100644 --- a/local/recipes/dev/llvm-native/recipe.toml +++ b/local/recipes/dev/llvm-native/recipe.toml @@ -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