We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a23dc4f + e20572d commit 0b266baCopy full SHA for 0b266ba
scripts/build/.variables
@@ -73,6 +73,10 @@ fi
73
if [ "$CGO_ENABLED" = "1" ] && [ "$GO_LINKMODE" = "static" ] && [ "$(go env GOOS)" = "linux" ]; then
74
LDFLAGS="$LDFLAGS -extldflags -static"
75
fi
76
+if [ "$CGO_ENABLED" = "1" ] && [ "$GO_LINKMODE" = "static" ]; then
77
+ # compiling statically with CGO enabled requires osusergo to be set.
78
+ GO_BUILDTAGS="$GO_BUILDTAGS osusergo"
79
+fi
80
if [ -n "$GO_STRIP" ]; then
81
LDFLAGS="$LDFLAGS -s"
82
0 commit comments