[PATCH] D145389: [lld][flang] Add exceptions for Flang runtime libraries on MinGW.

Markus Mützel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 6 08:14:17 PST 2023


mmuetzel created this revision.
mmuetzel added a reviewer: mstorsjo.
mmuetzel added projects: Flang, lld.
Herald added subscribers: sunshaoce, jdoerfert.
Herald added a project: All.
mmuetzel requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

When linking a shared library with Flang on MinGW, the functions from the
Flang runtime are exported from the shared library. When trying to link an
executable to that library using Flang, the linker errors out because the
functions from the runtime conflict with the functions exported from the
shared library.

Add the Flang runtime libraries to the list of libraries for which no
symbols are exported.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D145389

Files:
  lld/COFF/MinGW.cpp


Index: lld/COFF/MinGW.cpp
===================================================================
--- lld/COFF/MinGW.cpp
+++ lld/COFF/MinGW.cpp
@@ -49,6 +49,9 @@
       "libclang_rt.profile-x86_64",
       "libc++",
       "libc++abi",
+      "libFortran_main",
+      "libFortranRuntime",
+      "libFortranDecimal",
       "libunwind",
       "libmsvcrt",
       "libucrtbase",


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145389.502663.patch
Type: text/x-patch
Size: 376 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230306/65932c27/attachment.bin>


More information about the llvm-commits mailing list