[cfe-commits] PATCH: Better support for -g options in Clang driver

Chandler Carruth chandlerc at google.com
Mon Jun 4 10:46:32 PDT 2012


On Mon, Jun 4, 2012 at 10:11 AM, Eric Christopher <echristo at apple.com>wrote:

>
> On Jun 4, 2012, at 12:36 AM, Alexey Samsonov <samsonov at google.com> wrote:
>
> >
> >
> > On Sat, Jun 2, 2012 at 2:13 AM, Chandler Carruth <chandlerc at google.com>
> wrote:
> > On Fri, Jun 1, 2012 at 1:53 PM, Eric Christopher <echristo at apple.com>
> wrote:
> >
> > On Jun 1, 2012, at 12:37 PM, Alexey Samsonov <samsonov at google.com>
> wrote:
> >
> > >
> > >
> > > On Fri, Jun 1, 2012 at 9:58 PM, Eric Christopher <echristo at apple.com>
> wrote:
> > >
> > > On Jun 1, 2012, at 2:10 AM, Alexey Samsonov <samsonov at google.com>
> wrote:
> > >
> > > > Hi, cfe-commits!
> > > >
> > > > This patch improves support for different -g options:
> > > > 1) Flags -ggdb{0,2,3}, -gdwarf-{2,3,4} are now supported and
> translated to "-g" (except -ggdb0).
> > > > 2) Flag -gtoggle is supported.
> > > > 3) Flags -g[no-]record-gcc-switches and -g[no-]strict-dwarf are
> supported and ignored.
> > > > 4) Flags for alternate debug formats (-gcoff*, -gxcoff*, -gstabs*,
> -gvms*) are marked as unsupported and produce an error.
> > >
> > > ... what on earth is -gtoggle for?
> > >
> > > Or do you mean Clang doesn't need to support this one?
> > >
> >
> > I'm ok with it not supporting it. That's just silly. If you've got a use
> for it I don't necessarily mind though.
> >
> > I see no use for it. Let's not support it, ideally by rejecting it (as
> it should theoretically have an impact on the output that we won't
> reproduce.
> >
> > Agree. Marked -gtoggle as unsupported as well. What do you think of
> -g1/-ggdb1 options? AFAIR, Clang can't emit debug info of that level,
> > should we be more strict than just printing "arugment unused during
> compilation" warning as we do now?
>
> *shrug* We don't support level 3 at the moment or really any of the levels
> other than 0 (none) and (2) all of it, but no macros. I'd prefer right now
> just to not support -gLevel so people don't expect things. Just have it as
> "argument unused".


I would actually vote no warning at all on levels that don't mean
anything...

Having -g1 and -g3 be implemented the same as -g2 seems like a QoI issue to
me. We can always improve this later, or pay attention to these signals if
useful later, but it seems weird to warn the user about it...

My 2 cents.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120604/81ddb283/attachment.html>


More information about the cfe-commits mailing list