Skip to content

Commit 48570b3

Browse files
committed
BUILDING.md: add osusergo for static build
Go 1.11 includes a fix to os/user to be working in a static binary (fixing golang/go#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 <[email protected]>
1 parent 94cfce6 commit 48570b3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

BUILDING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ You can build static binaries by providing a few variables to `make`:
117117
```sudo
118118
make EXTRA_FLAGS="-buildmode pie" \
119119
EXTRA_LDFLAGS='-extldflags "-fno-PIC -static"' \
120-
BUILDTAGS="static_build netgo"
120+
BUILDTAGS="netgo osusergo static_build"
121121
```
122122

123123
> *Note*:

0 commit comments

Comments
 (0)