Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go build calls linker with seven -lleveldb flags #42

Open
tmm1 opened this issue Jul 21, 2019 · 0 comments
Open

go build calls linker with seven -lleveldb flags #42

tmm1 opened this issue Jul 21, 2019 · 0 comments

Comments

@tmm1
Copy link

tmm1 commented Jul 21, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant