[flang-commits] [flang] [flang] Link libflangPasses against correct libraries (PR #110840)

via flang-commits flang-commits at lists.llvm.org
Wed Oct 2 06:32:27 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-flang-fir-hlfir

Author: Tarun Prabhu (tarunprabhu)

<details>
<summary>Changes</summary>

libflangPasses.so was not linked against the correct libraries which caused a build failure with -DBUILD_SHARED_LIBS=On. Fixes #<!-- -->110425

---
Full diff: https://github.com/llvm/llvm-project/pull/110840.diff


1 Files Affected:

- (modified) flang/lib/Optimizer/Passes/CMakeLists.txt (+5) 


``````````diff
diff --git a/flang/lib/Optimizer/Passes/CMakeLists.txt b/flang/lib/Optimizer/Passes/CMakeLists.txt
index 3df988940e005f..40abbdfbdd6511 100644
--- a/flang/lib/Optimizer/Passes/CMakeLists.txt
+++ b/flang/lib/Optimizer/Passes/CMakeLists.txt
@@ -1,3 +1,6 @@
+get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
+get_property(extension_libs GLOBAL PROPERTY MLIR_EXTENSION_LIBS)
+
 add_flang_library(flangPasses
   CommandLineOpts.cpp
   Pipelines.cpp
@@ -9,6 +12,8 @@ add_flang_library(flangPasses
   FIRCodeGen
   FIRTransforms
   FlangOpenMPTransforms
+  ${dialect_libs}
+  ${extension_libs}
   FortranCommon
   HLFIRTransforms
   MLIRPass

``````````

</details>


https://github.com/llvm/llvm-project/pull/110840


More information about the flang-commits mailing list