Skip to content

Commit

Permalink
[lld][flang] Add exceptions for Flang runtime libraries on MinGW.
Browse files Browse the repository at this point in the history
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.

Reviewed By: mstorsjo

Differential Revision: https://reviews.llvm.org/D145389
  • Loading branch information
mstorsjo committed Mar 9, 2023
1 parent e281793 commit 04fc67b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lld/COFF/MinGW.cpp
Expand Up @@ -49,6 +49,9 @@ AutoExporter::AutoExporter(
"libclang_rt.profile-x86_64",
"libc++",
"libc++abi",
"libFortran_main",
"libFortranRuntime",
"libFortranDecimal",
"libunwind",
"libmsvcrt",
"libucrtbase",
Expand Down

0 comments on commit 04fc67b

Please sign in to comment.