Skip to content

Commit 086e859

Browse files
AkihiroSudathaJeztah
authored andcommitted
BUILDING.md: fix description about static builds
* `-linkmode external` is required since Go 1.15 for static builds: golang/go#40711 * Clarify the meaning of "loading plugins" Signed-off-by: Akihiro Suda <[email protected]> (cherry picked from commit 43cbdf8) Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 6b5fc7f commit 086e859

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

BUILDING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,13 @@ You can build static binaries by providing a few variables to `make`:
117117

118118
```sudo
119119
make EXTRA_FLAGS="-buildmode pie" \
120-
EXTRA_LDFLAGS='-extldflags "-fno-PIC -static"' \
120+
EXTRA_LDFLAGS='-linkmode external -extldflags "-fno-PIC -static"' \
121121
BUILDTAGS="netgo osusergo static_build"
122122
```
123123

124124
> *Note*:
125125
> - static build is discouraged
126-
> - static containerd binary does not support loading plugins
126+
> - static containerd binary does not support loading shared object plugins (`*.so`)
127127
128128
# Via Docker container
129129

0 commit comments

Comments
 (0)