mirror of
https://github.com/YspCoder/clawgo.git
synced 2026-05-18 08:18:58 +08:00
ci: build linux release artifacts with slimmer flags
This commit is contained in:
21
README_EN.md
21
README_EN.md
@@ -143,6 +143,16 @@ Main pages:
|
||||
make build-all
|
||||
```
|
||||
|
||||
### Linux slim build (without disabling channels)
|
||||
|
||||
```bash
|
||||
make build-linux-slim
|
||||
```
|
||||
|
||||
Notes (Linux only):
|
||||
- Keeps all channel capabilities while enabling `purego,netgo,osusergo` with `CGO_ENABLED=0` to reduce size and dynamic library coupling.
|
||||
- Optionally combine with `COMPRESS_BINARY=1` (if `upx` is installed) for additional compression.
|
||||
|
||||
Default matrix:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
@@ -158,6 +168,17 @@ Default matrix:
|
||||
make build-all BUILD_TARGETS="linux/amd64 linux/arm64 darwin/arm64 windows/amd64"
|
||||
```
|
||||
|
||||
### Ultra-slim build (target <10MB)
|
||||
|
||||
```bash
|
||||
make build COMPRESS_BINARY=1
|
||||
```
|
||||
|
||||
Notes:
|
||||
- Default build now uses `-trimpath -buildvcs=false -s -w` to remove path/symbol overhead.
|
||||
- With `COMPRESS_BINARY=1`, the build will try `upx --best --lzma` for further executable compression.
|
||||
- If `upx` is unavailable, build still succeeds and prints a warning.
|
||||
|
||||
### Package + checksums
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user