Skip to content

Commit 472a41d

Browse files
authored
Merge pull request #36 from mtlynch/static-build-1
Build backend using static linking
2 parents 4d2c0e2 + 4b25574 commit 472a41d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

scripts.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ build_frontend() {
2828

2929
build_backend() {
3030
echo "building backend"
31-
go build -o ./build/fusion ./cmd/server/*
31+
go build \
32+
-ldflags '-extldflags "-static"' \
33+
-o ./build/fusion \
34+
./cmd/server/*
3235
}
3336

3437
build() {
@@ -39,7 +42,9 @@ build() {
3942

4043
dev() {
4144
gen
42-
go run ./cmd/server
45+
go run \
46+
-ldflags '-extldflags "-static"' \
47+
./cmd/server
4348
}
4449

4550
case $1 in

0 commit comments

Comments
 (0)