[flang-commits] [flang] [mlir] [MLIR][LLVMIR][DLTI] Add `LLVM::TargetAttrInterface` and `#llvm.target` attr (PR #145899)

Fabian Mora via flang-commits flang-commits at lists.llvm.org
Tue Aug 19 09:13:19 PDT 2025


================
@@ -0,0 +1,21 @@
+add_mlir_dialect_library(MLIRTargetLLVMIRTransforms
+  TargetToDataLayout.cpp
+
+  DEPENDS
+  MLIRTargetLLVMIRTransformsIncGen
+
+  LINK_COMPONENTS
+  MC
+  Target
+  TargetParser
+  AllTargetsAsmParsers
+  AllTargetsCodeGens
+  AllTargetsDescs
+  AllTargetsInfos
----------------
fabianmcg wrote:

In a different comment you mentioned that you turned the initialization to a pass option instead of CMake and `#ifdef`s. The latter would've allowed guarding these with the same CMake option, so the pass wouldn't contain these link dependencies.

However, since this is a lib with only one pass and I'm not that concerned, if some wants a different behavior they can copy the pass with the right setup for their case.

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


More information about the flang-commits mailing list