Closed
Description
On tip, on linux-amd64, in the misc/swig/callback directory, running this command
CC=clang CGO_CFLAGS="-g -O2 -flto" CGO_LDFLAGS="-flto" go test -v
fails as follows:
# misc/swig/callback
cgo: cannot parse gcc output $WORK/b059//_cgo_.o as ELF, Mach-O, PE, XCOFF object
FAIL misc/swig/callback [build failed]
At least when using clang, cgo has to disable -flto
when it compiles the object, because cgo is unable to parse the byte code generated by clang.