Commit Graph

2 Commits

Author SHA1 Message Date
Ihar Hrachyshka
3a76fb80bb llvmPackages.mlir: version tablegen patch
The patch failed to apply on 18 and 19. We have to version it.

LLVM 18 has no MLIR_SRC_SHARDER_TABLEGEN_EXE. LLVM 19 and 20 fail to
apply the 21+ patch due to mechanical hunk failures, but otherwise use
an identical patch to 21+.
2026-09-06 21:44:24 -04:00
Acture
7e8258d3af llvm/mlir: fix MLIRConfig.cmake to support external tablegen overrides
MLIRConfig.cmake unconditionally overwrites MLIR_TABLEGEN_EXE and does
not create an imported target, breaking standalone builds that provide
their own mlir-tblgen binary (e.g. Nix sandboxed builds).

The patch adds guards to respect caller-set MLIR_TABLEGEN_EXE,
MLIR_PDLL_TABLEGEN_EXE, and MLIR_SRC_SHARDER_TABLEGEN_EXE values, and
auto-creates an imported mlir-tblgen target for downstream consumers.
This replaces the previous dummy-target workaround in flang's
CMakeLists.txt.

Upstream issue: https://github.com/llvm/llvm-project/issues/150986

Co-authored-by: Alexander Bantyev <balsoft@balsoft.ru>
2026-05-04 18:06:37 +08:00