Skip to content

Commit

Permalink
go build -ldflags="-w -s"
Browse files Browse the repository at this point in the history
  • Loading branch information
zanjie1999 committed Aug 21, 2023
1 parent 6cd9e47 commit a773e6e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
20 changes: 10 additions & 10 deletions build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,36 @@ mkdir build
SET CGO_ENABLED=1
SET GOARCH=amd64
SET GOOS=windows
go build
go build -ldflags="-w -s"
move tcp2ws.exe build\tcp2ws.exe
SET GOARCH=386
go build
go build -ldflags="-w -s"
move tcp2ws.exe build\tcp2ws-i386.exe
SET CGO_ENABLED=0
SET GOOS=linux
go build
go build -ldflags="-w -s"
move tcp2ws build\tcp2ws-linux-i386
SET GOARCH=amd64
go build
go build -ldflags="-w -s"
7z\7z a tcp2ws-linux.zip tcp2ws
copy /b kazari.png+tcp2ws-linux.zip build\tcp2ws-zip-linux.png
del tcp2ws-linux.zip
move tcp2ws build\tcp2ws-linux
SET GOARCH=arm
go build
go build -ldflags="-w -s"
move tcp2ws build\tcp2ws-linux-arm
SET GOARCH=mips
go build
go build -ldflags="-w -s"
move tcp2ws build\tcp2ws-linux-mips
SET GOARCH=arm64
go build
go build -ldflags="-w -s"
move tcp2ws build\tcp2ws-linux-arm64
SET GOOS=darwin
go build
go build -ldflags="-w -s"
move tcp2ws build\tcp2ws-darwin-arm64
SET GOARCH=amd64
go build
go build -ldflags="-w -s"
move tcp2ws build\tcp2ws-darwin
SET GOOS=freebsd
go build
go build -ldflags="-w -s"
move tcp2ws build/tcp2ws-freebsd
20 changes: 10 additions & 10 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,37 @@ rm -rf build/*
export CGO_ENABLED=1
export GOARCH=amd64
export GOOS=windows
go build
go build -ldflags="-w -s"
mv tcp2ws.exe build/tcp2ws.exe
export GOARCH=386
go build
go build -ldflags="-w -s"
mv tcp2ws.exe build/tcp2ws-i386.exe
export CGO_ENABLED=0
export GOOS=linux
go build
go build -ldflags="-w -s"
mv tcp2ws build/tcp2ws-linux-i386
export GOARCH=amd64
go build
go build -ldflags="-w -s"
zip tcp2ws-linux.zip tcp2ws
cp kazari.png build/tcp2ws-zip-linux.png
cat tcp2ws-linux.zip >> build/tcp2ws-zip-linux.png
rm tcp2ws-linux.zip
mv tcp2ws build/tcp2ws-linux
export GOARCH=arm
go build
go build -ldflags="-w -s"
mv tcp2ws build/tcp2ws-linux-arm
export GOARCH=mips
go build
go build -ldflags="-w -s"
mv tcp2ws build/tcp2ws-linux-mips
export GOARCH=arm64
go build
go build -ldflags="-w -s"
mv tcp2ws build/tcp2ws-linux-arm64
export GOOS=darwin
go build
go build -ldflags="-w -s"
mv tcp2ws build/tcp2ws-darwin-arm64
export GOARCH=amd64
go build
go build -ldflags="-w -s"
mv tcp2ws build/tcp2ws-darwin
export GOOS=freebsd
go build
go build -ldflags="-w -s"
mv tcp2ws build/tcp2ws-freebsd

0 comments on commit a773e6e

Please sign in to comment.