BUILDING.md: fix description about static builds
* `-linkmode external` is required since Go 1.15 for static builds: https://github.com/golang/go/issues/40711 * Clarify the meaning of "loading plugins" Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
parent
e9f94064b9
commit
43cbdf89e9
@ -117,13 +117,13 @@ You can build static binaries by providing a few variables to `make`:
|
||||
|
||||
```sudo
|
||||
make EXTRA_FLAGS="-buildmode pie" \
|
||||
EXTRA_LDFLAGS='-extldflags "-fno-PIC -static"' \
|
||||
EXTRA_LDFLAGS='-linkmode external -extldflags "-fno-PIC -static"' \
|
||||
BUILDTAGS="netgo osusergo static_build"
|
||||
```
|
||||
|
||||
> *Note*:
|
||||
> - static build is discouraged
|
||||
> - static containerd binary does not support loading plugins
|
||||
> - static containerd binary does not support loading shared object plugins (`*.so`)
|
||||
|
||||
# Via Docker container
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user