Commit 690fcacd authored by Devon H. O'Dell's avatar Devon H. O'Dell Committed by Russ Cox

cgo: Use -fno-eliminate-unused-debug-types when calling gcc to for dwarf stabs.

This keeps debug symbols in for e.g. unreferenced enums.

Fixes #479

R=rsc
CC=golang-dev, waltermundt
https://golang.org/cl/181102
parent e05b381e
......@@ -229,6 +229,7 @@ func (p *Prog) gccDebug(stdin []byte) (*dwarf.Data, string) {
"-Werror", // warnings are errors
"-o" + tmp, // write object to tmp
"-gdwarf-2", // generate DWARF v2 debugging symbols
"-fno-eliminate-unused-debug-types", // gets rid of e.g. untyped enum otherwise
"-c", // do not link
"-xc", // input language is C
"-", // read input from standard input
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment