mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Optionally enabled dqlite in build scripts
This commit is contained in:
parent
16ec08d425
commit
1f9e92e91f
@ -24,10 +24,16 @@ LDFLAGS="
|
||||
STATIC="
|
||||
-extldflags '-static'
|
||||
"
|
||||
|
||||
if [ "$DQLITE" = "true" ]; then
|
||||
DQLITE_TAGS="dqlite"
|
||||
DQLITE_STATIC_SQLITE="-luv -lraft -lco"
|
||||
fi
|
||||
|
||||
STATIC_SQLITE="
|
||||
-extldflags '-static -lm -ldl -lz -lpthread'
|
||||
-extldflags '-static -lm -ldl -lz -lpthread $DQLITE_STATIC_SQLITE'
|
||||
"
|
||||
TAGS="ctrd apparmor seccomp no_btrfs netgo osusergo providerless"
|
||||
TAGS="ctrd apparmor seccomp no_btrfs netgo osusergo providerless $DQLITE_TAGS"
|
||||
|
||||
if [ "$STATIC_BUILD" != "true" ]; then
|
||||
STATIC="
|
||||
|
@ -43,4 +43,7 @@ LDFLAGS="
|
||||
-w -s
|
||||
"
|
||||
STATIC="-extldflags '-static'"
|
||||
CGO_ENABLED=0 go build -ldflags "$LDFLAGS $STATIC" -o ${CMD_NAME} ./cmd/k3s/main.go
|
||||
if [ "$DQLITE" = "true" ]; then
|
||||
DQLITE_TAGS="dqlite"
|
||||
fi
|
||||
CGO_ENABLED=0 go build -tags "$DQLITE_TAGS" -ldflags "$LDFLAGS $STATIC" -o ${CMD_NAME} ./cmd/k3s/main.go
|
||||
|
Loading…
Reference in New Issue
Block a user