[clang] [clang][CIR] Fix missing dependency of MLIRCIR (PR #116221)

Luohao Wang via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 14 05:02:29 PST 2024


https://github.com/Luohaothu created https://github.com/llvm/llvm-project/pull/116221

Building `MLIRCIR` will report an error `CIROpsDialect.h.inc` not found. This is because `MLIRCIR` hasn't declared its dependence on the tablegen target `MLIRCIROpsIncGen`. This patch fixes the issue.

>From f2ed849e821f1355962ddedd5f254c551fe9553f Mon Sep 17 00:00:00 2001
From: Luohao Wang <Luohaothu at users.noreply.github.com>
Date: Thu, 14 Nov 2024 20:48:44 +0800
Subject: [PATCH] [clang][CIR] Fix missing dependency of MLIRCIR

---
 clang/lib/CIR/Dialect/IR/CMakeLists.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/clang/lib/CIR/Dialect/IR/CMakeLists.txt b/clang/lib/CIR/Dialect/IR/CMakeLists.txt
index 1518e8c760609c..75cee3f8711307 100644
--- a/clang/lib/CIR/Dialect/IR/CMakeLists.txt
+++ b/clang/lib/CIR/Dialect/IR/CMakeLists.txt
@@ -3,6 +3,9 @@ add_clang_library(MLIRCIR
   CIRDialect.cpp
   CIRTypes.cpp
 
+  DEPENDS
+  MLIRCIROpsIncGen
+
   LINK_LIBS PUBLIC
   MLIRIR
   )



More information about the cfe-commits mailing list