[llvm] [cmake] Pass LLVM_TABLEGEN_FLAGS to cross compile targets (PR #138086)
Carl Ritson via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 30 22:58:48 PDT 2025
https://github.com/perlfu created https://github.com/llvm/llvm-project/pull/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.
>From fc727781e8ac44e849a6ad273b50f04b4c621896 Mon Sep 17 00:00:00 2001
From: Carl Ritson <carl.ritson at amd.com>
Date: Thu, 1 May 2025 09:29:35 +0900
Subject: [PATCH] [cmake] Pass LLVM_TABLEGEN_FLAGS to cross compile targets
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.
---
llvm/cmake/modules/CrossCompile.cmake | 1 +
1 file changed, 1 insertion(+)
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}
More information about the llvm-commits
mailing list