From: Martin Storsjö Date: Thu, 9 Mar 2023 10:55:53 +0000 (+0200) Subject: [lld][flang] Add exceptions for Flang runtime libraries on MinGW. X-Git-Tag: upstream/17.0.6~15392 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=04fc67bf08daef5031f78c4a52a069ff29cff099;p=platform%2Fupstream%2Fllvm.git [lld][flang] Add exceptions for Flang runtime libraries on MinGW. 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 --- diff --git a/lld/COFF/MinGW.cpp b/lld/COFF/MinGW.cpp index 121256928567..2b403635b478 100644 --- a/lld/COFF/MinGW.cpp +++ b/lld/COFF/MinGW.cpp @@ -49,6 +49,9 @@ AutoExporter::AutoExporter( "libclang_rt.profile-x86_64", "libc++", "libc++abi", + "libFortran_main", + "libFortranRuntime", + "libFortranDecimal", "libunwind", "libmsvcrt", "libucrtbase",