[libcxx-dev] build issue on mingw gcc, need some help

Martin Storsjö via libcxx-dev libcxx-dev at lists.llvm.org
Fri Apr 26 13:10:39 PDT 2019


On Tue, 8 Jan 2019, Martin Storsjö via libcxx-dev wrote:

> On Tue, 8 Jan 2019, Maarten Verhage via libcxx-dev wrote:
>
>> I hope to get it a little better than -Wl,--export-all-symbols.
>
> Don't comment on that until you actually have gotten it all done - that 
> part is not related to how they're built and linked, but whether the 
> compiler emits dllexport for all the necessary symbols.
>
> I've looked a bit closer on that matter now, and it's related to how 
> libcxx does explicit template instantiation with visibility attributes 
> (dllexport). Neither g++ nor clang in mingw mode will create dllexports 
> for symbols from an explicit template instantiation with a dllexport 
> attribute, while msvc and clang in msvc mode does. I can open a bug report 
> with full details later.

As of now, libcxx can be built with Clang in MinGW mode as a working DLL, 
without -Wl,--export-all-symbols.

With GCC, the following two issues would have to be solved, to be able to 
make the DLL work properly without -Wl,--export-all-symbols:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89087
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89088

// Martin


More information about the libcxx-dev mailing list