Skip to content

Commit 35fd17a

Browse files
committed
fix static linking
1 parent cbba3b4 commit 35fd17a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

script/build

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22

33
output='sfs'
44

5-
CGO_ENABLED=0
6-
ldflags='-extldflags=-static'
7-
85
while getopts o: flag
96
do
107
case $flag in
118
o) output=$OPTARG;;
129
esac
1310
done
1411

15-
go build -a -ldflags "$ldflags" -o $output .
12+
CGO_ENABLED=0 go build -a -ldflags='-extldflags=-static' -o $output
13+
chmod +x $output

0 commit comments

Comments
 (0)