Skip to content

Commit 42b9edd

Browse files
committed
build: add wasm targets for keeper
1 parent 15ff378 commit 42b9edd

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

build/ci.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,18 @@ var (
107107
Tags: "ziren",
108108
Env: map[string]string{"GOMIPS": "softfloat", "CGO_ENABLED": "0"},
109109
},
110+
{
111+
Name: "wasm-js",
112+
GOOS: "js",
113+
GOARCH: "wasm",
114+
Tags: "example",
115+
},
116+
{
117+
Name: "wasm-wasi",
118+
GOOS: "wasip1",
119+
GOARCH: "wasm",
120+
Tags: "example",
121+
},
110122
{
111123
Name: "example",
112124
Tags: "example",
@@ -331,6 +343,9 @@ func buildFlags(env build.Environment, staticLinking bool, buildTags []string) (
331343
}
332344
ld = append(ld, "-extldflags", "'"+strings.Join(extld, " ")+"'")
333345
}
346+
if runtime.GOARCH == "wasm" {
347+
ld = append(ld, "-gcflags=all=-d=softfloat")
348+
}
334349
if len(ld) > 0 {
335350
flags = append(flags, "-ldflags", strings.Join(ld, " "))
336351
}

0 commit comments

Comments
 (0)