[llvm] [cmake] Pass LLVM_TABLEGEN_FLAGS to cross compile targets (PR #138086)

via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 30 23:01:56 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-tablegen

Author: Carl Ritson (perlfu)

<details>
<summary>Changes</summary>

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.

---
Full diff: https://github.com/llvm/llvm-project/pull/138086.diff


1 Files Affected:

- (modified) llvm/cmake/modules/CrossCompile.cmake (+1) 


``````````diff
diff --git a/llvm/cmake/modules/CrossCompile.cmake b/llvm/cmake/modules/CrossCompile.cmake
index 3b31d3e218a37..8691e4c47e5b3 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}

``````````

</details>


https://github.com/llvm/llvm-project/pull/138086


More information about the llvm-commits mailing list