golink

command module
v0.0.0-...-56d847a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2018 License: MIT Imports: 2 Imported by: 0

README

Go 1.10 Linker Flags

This is a tiny example using Go 1.10's scoped linker flags. Run it like so:

go get github.com/akshayjshah/golink
cd $GOPATH/src/github.com/akshayjshah/golink
sh demo.sh

Setting linker flags with -ldflags=all="<flags>" works, but unnecessarily forces a rebuild of all packages. I'm having trouble scoping the -ldflags argument to the correct package. Any ideas?

Solved!

This is related to https://github.com/golang/go/issues/24456, which tracks a regression in the Go tool - as of 1.10.0, it treats go build github.com/foo/bar/./ and go build github.com/foo/bar differently. The latter fixes the issue above.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL