[llvm-dev] Error cross building LLVM for MinGW

Tony Kelman via llvm-dev llvm-dev at lists.llvm.org
Fri Feb 19 18:18:09 PST 2016


Richard Pennington via llvm-dev <llvm-dev <at> lists.llvm.org> writes:

> 
> On 02/18/2016 11:51 PM, Tony Kelman via llvm-dev wrote:
> >
> > I can reproduce actually. Does your ecc++ driver default to trying to
> > link libstdc++ statically? Using the kinda-old x86_64-w64-mingw32-clang++
> > 3.5.1 that was recently added to Cygwin I get the same, but only when I
> > try to build with -static-libstdc++. (-fno-exceptions wouldn't be needed
> > with a more recent clang, I think)
> >
> > $ x86_64-w64-mingw32-clang++ -fno-exceptions -static-libstdc++ test.cpp
> >
> Yes, I link statically so I don't have to send DLLs.

You may hit exception-throwing issues from doing that, maybe consider
making static linking opt in instead of opt out as a workaround for this?
It doesn't look like g++ or clang implement a -shared-libstdc++ flag.

On this specific double definition error, hopefully someone more familiar
with libstdc++ and its interactions with clang can provide some guidance
here. libc++-on-mingw is sort of under construction I believe, but would
it be worth trying here?

-Tony




More information about the llvm-dev mailing list