• E
    build: respect environment LDFLAGS and strip the build path · 39e15234
    Eli Schwartz 提交于
    golang does not natively respect LDFLAGS, but you can pass them on the
    command line using -ldflags=-extldflags=...
    This is important for distributions, in order to provide common
    functionality such as hardening flags.
    
    Also strip the prefixed root source directory from the embedded source
    file paths. This is not important information for the debugger, which
    should only care about paths relative to $GOPATH, and results in less
    build environment metadata leaking into the final binary. (This also
    aids in reproducible builds when using different build directories, see
    e.g. https://github.com/golang/go/issues/16860)
    39e15234
Makefile 2.1 KB