Skip to content

Commit 08c34b5

Browse files
LanceAddhailaz
andauthored
feat(gf/build): Add support for the Loongson architecture (loong64) (gogf#4467)
添加对龙芯架构(loong64)的支持 --------- Co-authored-by: hailaz <739476267@qq.com>
1 parent 416f314 commit 08c34b5

2 files changed

Lines changed: 38 additions & 18 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Build CLI Binary For All Platform
3535
run: |
3636
cd cmd/gf
37-
gf build main.go -n gf -a all -s all -p temp
37+
gf build main.go -n gf -a all -s linux,windows,darwin,freebsd,netbsd,openbsd -p temp
3838
3939
- name: Move Files Before Release
4040
run: |

cmd/gf/internal/cmd/cmd_build.go

Lines changed: 37 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,10 @@ import (
3030
"github.com/gogf/gf/cmd/gf/v2/internal/utility/mlog"
3131
)
3232

33-
var (
34-
Build = cBuild{
35-
nodeNameInConfigFile: "gfcli.build",
36-
packedGoFileName: "internal/packed/build_pack_data.go",
37-
}
38-
)
33+
var Build = cBuild{
34+
nodeNameInConfigFile: "gfcli.build",
35+
packedGoFileName: "internal/packed/build_pack_data.go",
36+
}
3937

4038
type cBuild struct {
4139
g.Meta `name:"build" brief:"{cBuildBrief}" dc:"{cBuildDc}" eg:"{cBuildEg}" ad:"{cBuildAd}"`
@@ -65,45 +63,67 @@ It provides much more features for building binary:
6563
`
6664
cBuildAd = `
6765
PLATFORMS
66+
aix ppc64
67+
android 386,amd64,arm,arm64
6868
darwin amd64,arm64
69+
dragonfly amd64
6970
freebsd 386,amd64,arm
70-
linux 386,amd64,arm,arm64,ppc64,ppc64le,mips,mipsle,mips64,mips64le
71+
illumos amd64
72+
ios arm64
73+
js wasm
74+
linux 386,amd64,arm,arm64,loong64,mips,mipsle,mips64,mips64le,ppc64,ppc64le,riscv64,s390x
7175
netbsd 386,amd64,arm
72-
openbsd 386,amd64,arm
73-
windows 386,amd64
76+
openbsd 386,amd64,arm,arm64
77+
plan9 386,amd64,arm
78+
solaris amd64
79+
wasip1 wasm
80+
windows 386,amd64,arm,arm64
7481
`
7582
// https://golang.google.cn/doc/install/source
7683
cBuildPlatforms = `
84+
aix ppc64
85+
android 386
86+
android amd64
87+
android arm
88+
android arm64
7789
darwin amd64
7890
darwin arm64
79-
ios amd64
80-
ios arm64
91+
dragonfly amd64
8192
freebsd 386
8293
freebsd amd64
8394
freebsd arm
95+
illumos amd64
96+
ios arm64
97+
js wasm
8498
linux 386
8599
linux amd64
86100
linux arm
87101
linux arm64
88-
linux ppc64
89-
linux ppc64le
102+
linux loong64
90103
linux mips
91104
linux mipsle
92105
linux mips64
93106
linux mips64le
107+
linux ppc64
108+
linux ppc64le
109+
linux riscv64
110+
linux s390x
94111
netbsd 386
95112
netbsd amd64
96113
netbsd arm
97114
openbsd 386
98115
openbsd amd64
99116
openbsd arm
100-
windows 386
101-
windows amd64
102-
android arm
103-
dragonfly amd64
117+
openbsd arm64
104118
plan9 386
105119
plan9 amd64
120+
plan9 arm
106121
solaris amd64
122+
wasip1 wasm
123+
windows 386
124+
windows amd64
125+
windows arm
126+
windows arm64
107127
`
108128
)
109129

0 commit comments

Comments
 (0)