[clang] [CMake] Link MLIR if CLANG_ENABLE_CIR is ON (PR #226763)
Mehdi Amini via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 28 14:03:47 PDT 2026
================
@@ -43,6 +43,20 @@ set(CLANG_CONFIG_INCLUDE_DIRS
"${CLANG_SOURCE_DIR}/include"
"${CLANG_BINARY_DIR}/include"
)
+set(clang_config_needs_mlir OFF)
+if(CLANG_ENABLE_CIR AND NOT "mlir" IN_LIST LLVM_DEPENDENCY_ONLY_PROJECTS)
+ set(clang_config_needs_mlir ON)
----------------
joker-eph wrote:
> Instead, ClangTargets.cmake adds these libraries as static imported targets:
Why don't we do this unconditionally instead? That may be enough to solve your issue.
https://github.com/llvm/llvm-project/pull/226763
More information about the cfe-commits
mailing list