BUILDING.md: add osusergo for static build

Go 1.11 includes a fix to os/user to be working in a static binary
(fixing https://github.com/golang/go/issues/23265). The fix requires
`osusergo` build tag to be set for static binaries, which is what
this commit documents.

[v2: sort tags alphabetically]

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin 2018-07-19 11:14:59 +03:00
parent 94cfce62ba
commit 48570b39c5

View File

@ -117,7 +117,7 @@ You can build static binaries by providing a few variables to `make`:
```sudo
make EXTRA_FLAGS="-buildmode pie" \
EXTRA_LDFLAGS='-extldflags "-fno-PIC -static"' \
BUILDTAGS="static_build netgo"
BUILDTAGS="netgo osusergo static_build"
```
> *Note*: