docs: 修正编译环境变量

This commit is contained in:
Mmx
2024-03-23 02:44:58 +08:00
committed by GitHub
parent a4565143e3
commit 6dd2969f9b

View File

@@ -147,7 +147,7 @@ go build -gcflags=-trimpath=$GOPATH -asmflags=-trimpath=$GOPATH -ldflags "-s -w
交叉编译Linux
```shell
export GOGGC=0
export CGO_ENABLED=0
export GOOS=windows #系统
export GOARCH=amd64 #架构
go build -gcflags=-trimpath=$GOPATH -asmflags=-trimpath=$GOPATH -ldflags "-s -w -extldflags '-static'" ./cmd/bitsrun
@@ -156,7 +156,7 @@ go build -gcflags=-trimpath=$GOPATH -asmflags=-trimpath=$GOPATH -ldflags "-s -w
交叉编译Powershell
```shell
$env:GOGGC=0
$env:CGO_ENABLED=0
$env:GOOS='linux' #系统
$env:GOARCH='amd64' #架构
go build -gcflags=-trimpath=$env:GOPATH -asmflags=-trimpath=$env:GOPATH -ldflags "-s -w -extldflags '-static'" ./cmd/bitsrun