[clang] [CIR][CMake] Add missing MLIR tablegen dependencies to CIR libraries (PR #235185)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 30 17:07:16 PDT 2026
================
@@ -25,6 +25,7 @@ add_clang_library(MLIRCIRInterfaces
MLIRInferTypeOpInterfaceIncGen
MLIRLoopLikeInterfaceIncGen
MLIRSideEffectInterfacesIncGen
+ mlir-headers
----------------
h-vetinari wrote:
This opens a race, at least in a CIR standalone build (c.f. #237058). Building from 59798fc8ac13ad8dbdfbc3d329d545d5563d46eb (plus a fix for that issue), I get
```
[ 30%] Building CXX object lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/AMDGPU.cpp.o
In file included from $SRC_DIR/clang/lib/CIR/Interfaces/ASTAttrInterfaces.cpp:13:
$SRC_DIR/clang/include/clang/CIR/Interfaces/ASTAttrInterfaces.h:19:10: fatal error: 'clang/CIR/Interfaces/ASTAttrInterfaces.h.inc' file not found
19 | #include "clang/CIR/Interfaces/ASTAttrInterfaces.h.inc"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
```
but not consistently across platforms (pointing at the race again). That's because the target `mlir-headers` has been built at that point already, so is ignored as a dependency.
AFAICT, CIR integration needs to distinguish between `MLIR*` targets, and `MLIRCIR*` targets.
https://github.com/llvm/llvm-project/pull/235185
More information about the cfe-commits
mailing list