[llvm] 3015edf - [cmake] Pass LLVM_TABLEGEN_FLAGS to cross compile targets (#138086)
via llvm-commits
llvm-commits at lists.llvm.org
Thu May 1 04:49:25 PDT 2025
Author: Carl Ritson
Date: 2025-05-01T20:49:22+09:00
New Revision: 3015edf96e4faad0d367d0879269c1c905a4eec7
URL: https://github.com/llvm/llvm-project/commit/3015edf96e4faad0d367d0879269c1c905a4eec7
DIFF: https://github.com/llvm/llvm-project/commit/3015edf96e4faad0d367d0879269c1c905a4eec7.diff
LOG: [cmake] Pass LLVM_TABLEGEN_FLAGS to cross compile targets (#138086)
If ValueTypes.td contains conditional directives enabled by defs in
LLVM_TABLEGEN_FLAGS then native build tblgen and min-tblgen must be
built with matching flags.
This ensures the embedded types in TableGen are consistent with those
used for building tables.
Added:
Modified:
llvm/cmake/modules/CrossCompile.cmake
Removed:
################################################################################
diff --git a/llvm/cmake/modules/CrossCompile.cmake b/llvm/cmake/modules/CrossCompile.cmake
index 3b31d3e218a37..ea5195c9c574c 100644
--- a/llvm/cmake/modules/CrossCompile.cmake
+++ b/llvm/cmake/modules/CrossCompile.cmake
@@ -100,6 +100,7 @@ function(llvm_create_cross_target project_name target_name toolchain buildtype)
-DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN="${LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN}"
-DLLVM_INCLUDE_BENCHMARKS=OFF
-DLLVM_INCLUDE_TESTS=OFF
+ -DLLVM_TABLEGEN_FLAGS="${LLVM_TABLEGEN_FLAGS}"
${build_type_flags} ${linker_flag} ${external_clang_dir} ${libc_flags}
${ARGN}
WORKING_DIRECTORY ${${project_name}_${target_name}_BUILD}
More information about the llvm-commits
mailing list