2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-22 04:45:15 +00:00

build.go: Add go1.7 to list of linkers requiring -Xfoo=bar syntax

This commit is contained in:
mappu 2016-07-16 09:42:02 +12:00
parent c9ab75a44c
commit 38d4522ea5

View File

@ -263,7 +263,7 @@ func (cs Constants) LDFlags() string {
l := make([]string, 0, len(cs))
v := runtime.Version()
if strings.HasPrefix(v, "go1.5") || strings.HasPrefix(v, "go1.6") {
if strings.HasPrefix(v, "go1.5") || strings.HasPrefix(v, "go1.6") || strings.HasPrefix(v, "go1.7") {
for k, v := range cs {
l = append(l, fmt.Sprintf(`-X "%s=%s"`, k, v))
}