-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[flang] Link libflangPasses against correct libraries #110840
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
Conversation
|
@llvm/pr-subscribers-flang-fir-hlfir Author: Tarun Prabhu (tarunprabhu) ChangeslibflangPasses.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:
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
|
|
Could you double check that this fix works for you. I am still in the process of building it myself, but a second check might be helpful. Thanks! |
|
It seems to have worked for me with your configuration line, @pawosm-arm |
|
@pawosm-arm, does this fix your issue? |
|
I'll look into it today, though it may take some time before I complete this. |
|
The good news is that it builds with -j9 now, so your patch has definitely helped. Yet still I can't build with -j1, but this is caused by some other issue (of similar nature): I assume it is not in scope of this patch. |
Thanks for taking a look, Paul. I don't see this error in the original issue that you filed, so I think it is best to merge this in now. I will work on trying to reproduce and resolve the missing |
libflangPasses.so was not linked against the correct libraries which caused a build failure with -DBUILD_SHARED_LIBS=On. Fixes llvm#110425
libflangPasses.so was not linked against the correct libraries which caused a build failure with -DBUILD_SHARED_LIBS=On. Fixes #110425