mirror of
https://github.com/tavenli/port-forward.git
synced 2024-04-21 12:42:13 +00:00
24 lines
326 B
Batchfile
24 lines
326 B
Batchfile
|
|
::Build For Linux
|
|
|
|
echo "Clean for build..."
|
|
go clean
|
|
|
|
echo "Build For Linux..."
|
|
|
|
::set CGO_ENABLED=0
|
|
set GOOS=linux
|
|
set GOARCH=amd64
|
|
|
|
go build -o forward-server
|
|
|
|
::go build -ldflags "-s -w" -o forward-server
|
|
::-s 去掉符号表
|
|
::-w 去掉DWARF调试信息,得到的程序不能用gdb调试
|
|
|
|
echo "--------- Build For Linux Success!"
|
|
|
|
|
|
pause
|
|
|