[flang-commits] [flang] 39a9ab1 - [flang] Fix link error in shared library builds (#220550)
via flang-commits
flang-commits at lists.llvm.org
Wed Sep 2 04:17:25 PDT 2026
Author: David Spickett
Date: 2026-09-02T11:17:20Z
New Revision: 39a9ab1bb6776e16be2c74bdba66677ad991114d
URL: https://github.com/llvm/llvm-project/commit/39a9ab1bb6776e16be2c74bdba66677ad991114d
DIFF: https://github.com/llvm/llvm-project/commit/39a9ab1bb6776e16be2c74bdba66677ad991114d.diff
LOG: [flang] Fix link error in shared library builds (#220550)
Since #218917 / 813bdb184af716091bb927070063a3e065124d33.
Errors of the form:
/usr/bin/ld: <...>/build/./lib/libFortranLower.so.24.0git: error adding
symbols: DSO missing from command line
My changes to the constructor changed dependencies. I could either add a
dependency on that library,
or refactor it a bit to avoid it.
I don't know if linking that library is a good idea, so I'm going the
latter.
Added:
Modified:
flang/include/flang/Frontend/CompilerInstance.h
flang/lib/Frontend/CompilerInstance.cpp
Removed:
################################################################################
diff --git a/flang/include/flang/Frontend/CompilerInstance.h b/flang/include/flang/Frontend/CompilerInstance.h
index 3909e7bf37bba..842f37290e109 100644
--- a/flang/include/flang/Frontend/CompilerInstance.h
+++ b/flang/include/flang/Frontend/CompilerInstance.h
@@ -111,8 +111,8 @@ class CompilerInstance {
/// @}
public:
- explicit CompilerInstance(std::shared_ptr<CompilerInvocation> invocation =
- std::make_shared<CompilerInvocation>());
+ CompilerInstance();
+ explicit CompilerInstance(std::shared_ptr<CompilerInvocation> invocation);
~CompilerInstance();
diff --git a/flang/lib/Frontend/CompilerInstance.cpp b/flang/lib/Frontend/CompilerInstance.cpp
index d35f549701282..f1e0b16c08474 100644
--- a/flang/lib/Frontend/CompilerInstance.cpp
+++ b/flang/lib/Frontend/CompilerInstance.cpp
@@ -33,6 +33,9 @@
using namespace Fortran::frontend;
+CompilerInstance::CompilerInstance()
+ : CompilerInstance(std::make_shared<CompilerInvocation>()) {}
+
CompilerInstance::CompilerInstance(
std::shared_ptr<CompilerInvocation> invocation)
: invocation(std::move(invocation)),
More information about the flang-commits
mailing list