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

Martin Storsjö via libcxx-dev libcxx-dev at lists.llvm.org
Wed Jan 9 23:25:12 PST 2019


On Wed, 9 Jan 2019, Shoaib Meenai wrote:

> Note that stdlib_exception.cpp and stdlib_new_delete.cpp already define 
> _LIBCPP_BUILDING_LIBRARY. Perhaps stdlib_typeinfo.cpp should follow 
> suit?

Oh, indeed. Then that's definitely needed for the other stdlib_*.cpp as 
well, in order to get dllexport defined for the symbols it generates.

However, that isn't enough. Almost all source files in libcxxabi seem to 
refer to std::terminate, which is implemented by libcxxabi itself. Thus, 
the declaration of std::terminate shouldn't be marked dllimport anywhere 
in any of the translation units.

Therefore I suspect it'd be best to just define _LIBCPP_BUILDING_LIBRARY 
for all of it.

If there legitimately are functions that would need to be imported from 
libcxx, they can be linked just fine via thunks, and data symbols should 
be handled by the mingw specific auto-import mechanism.

// Martin



More information about the libcxx-dev mailing list