Make -fstandalone-debug default on mingw

David Blaikie dblaikie at gmail.com
Mon Sep 1 12:25:43 PDT 2014


On Mon, Sep 1, 2014 at 11:38 AM, Yaron Keren <yaron.keren at gmail.com> wrote:

> http://llvm.org/bugs/show_bug.cgi?id=20741
>
> With the current default, a programmer compiling his program with clang -g
> will not get debug info for std::string members and thus the gdb pretty
> printer for std::string will fail. That's how I noticed the problem in the
> first place. Given that libstdc++ is used in every C++ program and that
> std::string is quite popular, this isn't a good result.
>

On most linux distributions, there's a -dbg variant of libstdc++ that users
can install to get the library's debug information (GCC relies on this for
various parts of its debug output, for example - I'd be curious to know if
their default is any different on MinGW). Is there no such thing on MinGW?
(do you know if GCC does the same thing? try compiling this source file to
an object file with gcc: "struct foo { virtual void func(); } foo f;" and
see if GCC emits the definition of 'foo', or just a declaration - on Linux
it'll only produce a declaration)


>
> This patch makes  -fstandalone-debug default on mingw.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140901/a2aa5dab/attachment.html>


More information about the cfe-commits mailing list