[clang] [CIR] Extract DynLib build/link fixes from #221291 (PR #232330)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 15 06:49:08 PDT 2026


https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/232330

>From 5e546b0e31cbdc331dee16a8b32f3fd139642b9a Mon Sep 17 00:00:00 2001
From: erichkeane <ekeane at nvidia.com>
Date: Thu, 15 Oct 2026 06:41:13 -0700
Subject: [PATCH 1/2] [CIR] Extract DynLib build/link fixes from #221291

The review from #221291 finally got me to see that we failed a few
things with Dynlib.  This extracts the changes from that review so that
they are separate from the main one, so we can merge that patch with
this on main eventually.
---
 clang/lib/CIR/Dialect/Transforms/CMakeLists.txt | 3 +++
 clang/tools/cir-opt/CMakeLists.txt              | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/clang/lib/CIR/Dialect/Transforms/CMakeLists.txt b/clang/lib/CIR/Dialect/Transforms/CMakeLists.txt
index 2d6d04fb24abc5..e04adcbb0d5cf8 100644
--- a/clang/lib/CIR/Dialect/Transforms/CMakeLists.txt
+++ b/clang/lib/CIR/Dialect/Transforms/CMakeLists.txt
@@ -19,6 +19,9 @@ add_clang_library(MLIRCIRTransforms
   DEPENDS
   MLIRCIRPassIncGen
 
+  LINK_COMPONENTS
+  ABI
+
   LINK_LIBS PUBLIC
   clangBasic
 
diff --git a/clang/tools/cir-opt/CMakeLists.txt b/clang/tools/cir-opt/CMakeLists.txt
index 9257bb80f978ef..40304dd4a114e4 100644
--- a/clang/tools/cir-opt/CMakeLists.txt
+++ b/clang/tools/cir-opt/CMakeLists.txt
@@ -20,11 +20,11 @@ clang_target_link_libraries(cir-opt
   CIRRegisterAllDialects
   MLIRCIR
   MLIRCIRTransforms
-  ${cir_opt_test_libs}
 )
 
 target_link_libraries(cir-opt
   PRIVATE
+  ${cir_opt_test_libs}
   MLIRAnalysis
   MLIRDialect
   MLIRIR

>From ad3a9af6cb07486f54e243f8565f61153cc96c97 Mon Sep 17 00:00:00 2001
From: erichkeane <ekeane at nvidia.com>
Date: Thu, 15 Oct 2026 06:48:47 -0700
Subject: [PATCH 2/2] remove line I missed... i need to stop doing work before
 coffee

---
 clang/lib/CIR/Dialect/Transforms/CMakeLists.txt | 1 -
 1 file changed, 1 deletion(-)

diff --git a/clang/lib/CIR/Dialect/Transforms/CMakeLists.txt b/clang/lib/CIR/Dialect/Transforms/CMakeLists.txt
index e04adcbb0d5cf8..614f3608352426 100644
--- a/clang/lib/CIR/Dialect/Transforms/CMakeLists.txt
+++ b/clang/lib/CIR/Dialect/Transforms/CMakeLists.txt
@@ -25,7 +25,6 @@ add_clang_library(MLIRCIRTransforms
   LINK_LIBS PUBLIC
   clangBasic
 
-  LLVMABI
   MLIRABI
   MLIRAnalysis
   MLIRDLTIDialect



More information about the cfe-commits mailing list