-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[clang][CIR] Add missing dependency on MLIR headers #131057
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
bcardosolopes
merged 6 commits into
llvm:main
from
darkbuck:hliao/main/fix-cir-dependency
Mar 17, 2025
Merged
[clang][CIR] Add missing dependency on MLIR headers #131057
bcardosolopes
merged 6 commits into
llvm:main
from
darkbuck:hliao/main/fix-cir-dependency
Mar 17, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@llvm/pr-subscribers-clangir Author: None (darkbuck) ChangesFull diff: https://github.com/llvm/llvm-project/pull/131057.diff 2 Files Affected:
diff --git a/clang/lib/CIR/FrontendAction/CMakeLists.txt b/clang/lib/CIR/FrontendAction/CMakeLists.txt
index 6d5a8758468f6..df0e075fb7532 100644
--- a/clang/lib/CIR/FrontendAction/CMakeLists.txt
+++ b/clang/lib/CIR/FrontendAction/CMakeLists.txt
@@ -11,6 +11,9 @@ add_clang_library(clangCIRFrontendAction
DEPENDS
MLIRCIROpsIncGen
MLIRCIROpInterfacesIncGen
+ # Add mlir-generic-headers dependency as the header CIRGenAction.h needs to
+ # include BuiltinOps.h
+ mlir-generic-headers
LINK_LIBS
clangAST
diff --git a/clang/lib/FrontendTool/CMakeLists.txt b/clang/lib/FrontendTool/CMakeLists.txt
index d7a3699361f0a..5a828ce239c64 100644
--- a/clang/lib/FrontendTool/CMakeLists.txt
+++ b/clang/lib/FrontendTool/CMakeLists.txt
@@ -15,6 +15,11 @@ set(link_libs
set(deps)
if(CLANG_ENABLE_CIR)
+ # Add mlir-generic-headers dependency as the header CIRGenAction.h needs to
+ # include BuiltinOps.h
+ list(APPEND deps
+ mlir-generic-headers
+ )
list(APPEND link_libs
clangCIRFrontendAction
MLIRIR
|
@llvm/pr-subscribers-clang Author: None (darkbuck) ChangesFull diff: https://github.com/llvm/llvm-project/pull/131057.diff 2 Files Affected:
diff --git a/clang/lib/CIR/FrontendAction/CMakeLists.txt b/clang/lib/CIR/FrontendAction/CMakeLists.txt
index 6d5a8758468f6..df0e075fb7532 100644
--- a/clang/lib/CIR/FrontendAction/CMakeLists.txt
+++ b/clang/lib/CIR/FrontendAction/CMakeLists.txt
@@ -11,6 +11,9 @@ add_clang_library(clangCIRFrontendAction
DEPENDS
MLIRCIROpsIncGen
MLIRCIROpInterfacesIncGen
+ # Add mlir-generic-headers dependency as the header CIRGenAction.h needs to
+ # include BuiltinOps.h
+ mlir-generic-headers
LINK_LIBS
clangAST
diff --git a/clang/lib/FrontendTool/CMakeLists.txt b/clang/lib/FrontendTool/CMakeLists.txt
index d7a3699361f0a..5a828ce239c64 100644
--- a/clang/lib/FrontendTool/CMakeLists.txt
+++ b/clang/lib/FrontendTool/CMakeLists.txt
@@ -15,6 +15,11 @@ set(link_libs
set(deps)
if(CLANG_ENABLE_CIR)
+ # Add mlir-generic-headers dependency as the header CIRGenAction.h needs to
+ # include BuiltinOps.h
+ list(APPEND deps
+ mlir-generic-headers
+ )
list(APPEND link_libs
clangCIRFrontendAction
MLIRIR
|
This patch is to fix the build failure once CIR is enabled. The error reads like
|
- Add dependency on MLIRBuiltinOpsIncGen as "clang/CIR/FrontendAction/CIRGenAction.h" needs to include "mlir/IR/BuiltinOps.h"
c716e64
to
255050e
Compare
bcardosolopes
approved these changes
Mar 17, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.