Skip to content

cmd/go: add -debug flag (default true) to control DWARF/etc info in binary #38777

Open
@josharian

Description

@josharian

Many gophers know that they can strip DWARF from their binaries with -ldflags=-w. But this is fairly cryptic, and it doesn't give the compiler the opportunity to save time and space by not generating that DWARF in the first place.

I propose we add support directly to cmd/go to say -debug=false or -dwarf=false or the like. Then cmd/go would translate that into the appropriate compiler and linker flags.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Accepted

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions