Skip to content

Commit

Permalink
Update 交叉编译-build.md
Browse files Browse the repository at this point in the history
  • Loading branch information
hailaz authored Mar 7, 2025
1 parent 8241db6 commit b8744cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/docs/开发工具/交叉编译-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ gfcli:
| 名称 | 默认值 | 含义 | 示例 |
| --- | --- | --- | --- |
| `name` | 与程序入口 `go` 文件同名 | 生成的可执行文件名称。如果是 `windows` 平台,那么默认会加上 `.exe` 后缀 | `gf` |
| `arch` | 当前系统架构 | 编译架构,多个以 `,` 号分隔,如果是 `all` 表示编译所有支持架构 | `386,amd64,arm` |
| `system` | `当前系统平台` | 编译平台,多个以 `,` 号分隔,如果是 `all` 表示编译所有支持平台 | `linux,darwin,windows` |
| `arch` | 当前系统架构 | 编译架构,多个以 `,` 号分隔,如果是 `all` 表示编译所有支持架构 | `386,amd64,arm` [更多](https://golang.google.cn/doc/install/source#environment) |
| `system` | `当前系统平台` | 编译平台,多个以 `,` 号分隔,如果是 `all` 表示编译所有支持平台 | `linux,darwin,windows` [更多](https://golang.google.cn/doc/install/source#environment) |
| `path` | `./bin` | 编译可执行文件存储的 **目录地址** | `./bin` |
| `mod` | | 同 `go build -mod` 编译选项,不常用 | `none` |
| `cgo` | `false` | 是否开启 `CGO`,默认是关闭的。如果开启,那么交叉编译可能会有问题。 | |
Expand Down Expand Up @@ -88,4 +88,4 @@ $ gf build
2020-12-31 00:36:20.327 go build -o ./bin/windows_386/gf.exe main.go
2020-12-31 00:36:22.994 go build -o ./bin/windows_amd64/gf.exe main.go
2020-12-31 00:36:25.795 done!
```
```

0 comments on commit b8744cc

Please sign in to comment.