-
Notifications
You must be signed in to change notification settings - Fork 805
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
3 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
# 编译mac下可以执行文件 | ||
go build -ldflags "-s -w" -o go-stress-testing-mac main.go | ||
#go build -ldflags "-s -w" -o go-stress-testing-mac main.go | ||
|
||
# 使用交叉编译 linux和windows版本可以执行的文件 | ||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -o go-stress-testing-linux main.go | ||
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags "-s -w" -o go-stress-testing-linux-arm64 main.go | ||
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "-s -w" -o go-stress-testing-win.exe main.go | ||
CGO_ENABLED=0 GOOS=linux GOARCH=loong64 go build -ldflags "-s -w" -o go-stress-testing-linux-loong64 main.go | ||
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags "-s -w" -o go-stress-testing-mac main.go # m1 芯片 | ||
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w" -o go-stress-testing-mac-intel64 main.go # intel64 |