So I'm trying to compile a test program with the cflag -flto and it failed
to build with the message:
>
> cannot load DWARF output from $WORK/b001//_cgo_.o: decoding dwarf section
> info at offset 0x0: too short
I feel like I'm doing something wrong so I posed here instead of on github.
Even tried building with -ldflags "-linkmode=external"
package main
/*
#cgo CFLAGS: -flto
#cgo CXXFLAGS: -flto
*/
import "C"
import "fmt"
func main() {
fmt.Println("Hello World", C.int(0))
}
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.