mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-22 10:58:57 +00:00
Allow extending LDFLAGS by setting EXTRA_LDFLAGS to be able to pass -extldflags=-zrelro -ldflags=-extldflags=-znow for Arch Linux packaging to get full relro.
This commit is contained in:
parent
88482b29ee
commit
9a9bcff3e9
3
build.go
3
build.go
@ -801,6 +801,9 @@ func ldflags() string {
|
||||
fmt.Fprintf(b, " -X github.com/syncthing/syncthing/lib/build.Stamp%c%d", sep, buildStamp())
|
||||
fmt.Fprintf(b, " -X github.com/syncthing/syncthing/lib/build.User%c%s", sep, buildUser())
|
||||
fmt.Fprintf(b, " -X github.com/syncthing/syncthing/lib/build.Host%c%s", sep, buildHost())
|
||||
if v := os.Getenv("EXTRA_LDFLAGS"); v != "" {
|
||||
fmt.Fprintf(b, " %s", v);
|
||||
}
|
||||
return b.String()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user