script/build: add '--dwarf' flag to include DWARF tables in artifact(s)

This commit is contained in:
Taylor Blau 2017-02-13 17:23:49 -07:00
parent 83363958bb
commit e118e2abdc

@ -22,6 +22,7 @@ var (
BuildOS = flag.String("os", runtime.GOOS, "OS to target: darwin, freebsd, linux, windows")
BuildArch = flag.String("arch", "", "Arch to target: 386, amd64")
BuildAll = flag.Bool("all", false, "Builds all architectures")
BuildDwarf = flag.Bool("dwarf", false, "Includes DWARF tables in build artifacts")
ShowHelp = flag.Bool("help", false, "Shows help")
matrixKeys = map[string]string{
"darwin": "Mac",
@ -54,6 +55,9 @@ func mainBuild() {
"github.com/git-lfs/git-lfs/config.GitCommit="+string(cmd),
))
}
if !*BuildDwarf {
LdFlags = append(LdFlags, "-s", "-w")
}
buildMatrix := make(map[string]Release)
errored := false