7e8258d3af
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>