[flang-commits] [flang] [flang] Link libflangPasses against correct libraries (PR #110840)
Tarun Prabhu via flang-commits
flang-commits at lists.llvm.org
Wed Oct 2 06:31:51 PDT 2024
https://github.com/tarunprabhu created https://github.com/llvm/llvm-project/pull/110840
libflangPasses.so was not linked against the correct libraries which caused a build failure with -DBUILD_SHARED_LIBS=On. Fixes #110425
>From cacdfe507812558763e0db1bdcc1b69e6d8d674b Mon Sep 17 00:00:00 2001
From: Tarun Prabhu <tarun at lanl.gov>
Date: Wed, 2 Oct 2024 07:29:36 -0600
Subject: [PATCH] [flang] Link libflangPasses against correct libraries
libflangPasses.so was not linked against the correct libraries which caused a
build failure with -DBUILD_SHARED_LIBS=On. Fixes #110425
---
flang/lib/Optimizer/Passes/CMakeLists.txt | 5 +++++
1 file changed, 5 insertions(+)
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
More information about the flang-commits
mailing list