go build calls linker with seven -lleveldb flags
tmm1 opened this issue · 0 comments
This is fairly harmless, but I noticed using go build -extldflags="-v"
that the linker is called with one -lleveldb
per comment in the code base:
0.71 host link: "gcc" "-o" "/tmp/go-build236882147/b001/exe/a.out" "-static" "/tmp/go-link-066068984/go.o" "/tmp/go-link-066068984/000000.o" "/tmp/go-link-066068984/000001.o" "/tmp/go-link-066068984/000002.o" "/tmp/go-link-066068984/000003.o" "/tmp/go-link-066068984/000004.o" "/tmp/go-link-066068984/000005.o" "/tmp/go-link-066068984/000006.o" "/tmp/go-link-066068984/000007.o" "/tmp/go-link-066068984/000008.o" "/tmp/go-link-066068984/000009.o" "/tmp/go-link-066068984/000010.o" "/tmp/go-link-066068984/000011.o" "/tmp/go-link-066068984/000012.o" "/tmp/go-link-066068984/000013.o" "/tmp/go-link-066068984/000014.o" "/tmp/go-link-066068984/000015.o" "/tmp/go-link-066068984/000016.o" "/tmp/go-link-066068984/000017.o" "/tmp/go-link-066068984/000018.o" "/tmp/go-link-066068984/000019.o" "/tmp/go-link-066068984/000020.o" "/tmp/go-link-066068984/000021.o" "/tmp/go-link-066068984/000022.o" "/tmp/go-link-066068984/000023.o" "/tmp/go-link-066068984/000024.o" "/tmp/go-link-066068984/000025.o" "/tmp/go-link-066068984/000026.o" "/tmp/go-link-066068984/000027.o" "/tmp/go-link-066068984/000028.o" "/tmp/go-link-066068984/000029.o" "-lleveldb" "-lleveldb" "-lleveldb" "-lleveldb" "-lleveldb" "-lleveldb" "-lleveldb" "-lleveldb" "-lleveldb" "-static" "-lpthread"
This is related to golang/go#25930 and will hopefully be fixed upstream. Regardless, it might be nice to consolidate all the cgo comments in the code-base into one cgo.go
file, similar to https://github.com/golang/go/blob/master/src/runtime/cgo/cgo.go.