增加 go 编译参数.

Signed-off-by: chen.yang <chen.yang@yuzhen-iot.com>
This commit is contained in:
chen.yang 2021-10-28 20:25:44 +08:00
parent b039405e92
commit 608f1bb9d9
1 changed files with 1 additions and 0 deletions

View File

@ -42,6 +42,7 @@ Golang 的交叉编译是通过设置编译宏变量来实现的,主要是 GOO
```bash
GOOS=linux GOARCH=arm64 go build
GOOS=linux GOARCH=arm GOARM=7 go build
```
交叉编译是不支持 CGO 的,也就是说如果你的代码中存在 C 代码,是编译不了的。,比如说你的程序中使用了 sqlite 数据库,在编译 go-sqlite 驱动时按照上面的做法是编译不通过的。