From 42b9eddadcca274af25ca270e4d3fb74d01546be Mon Sep 17 00:00:00 2001 From: Guillaume Ballet <3272758+gballet@users.noreply.github.com> Date: Fri, 7 Nov 2025 21:23:40 +0100 Subject: [PATCH 1/2] build: add wasm targets for keeper --- build/ci.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/build/ci.go b/build/ci.go index 59c948acb386..b2749a79cf46 100644 --- a/build/ci.go +++ b/build/ci.go @@ -107,6 +107,18 @@ var ( Tags: "ziren", Env: map[string]string{"GOMIPS": "softfloat", "CGO_ENABLED": "0"}, }, + { + Name: "wasm-js", + GOOS: "js", + GOARCH: "wasm", + Tags: "example", + }, + { + Name: "wasm-wasi", + GOOS: "wasip1", + GOARCH: "wasm", + Tags: "example", + }, { Name: "example", Tags: "example", @@ -331,6 +343,9 @@ func buildFlags(env build.Environment, staticLinking bool, buildTags []string) ( } ld = append(ld, "-extldflags", "'"+strings.Join(extld, " ")+"'") } + if runtime.GOARCH == "wasm" { + ld = append(ld, "-gcflags=all=-d=softfloat") + } if len(ld) > 0 { flags = append(flags, "-ldflags", strings.Join(ld, " ")) } From c480006d732539cd9c994c634d8833c7d406c019 Mon Sep 17 00:00:00 2001 From: Guillaume Ballet <3272758+gballet@users.noreply.github.com> Date: Mon, 10 Nov 2025 10:42:59 +0100 Subject: [PATCH 2/2] Apply suggestion from @gballet --- build/ci.go | 1 + 1 file changed, 1 insertion(+) diff --git a/build/ci.go b/build/ci.go index b2749a79cf46..e589cd2b405c 100644 --- a/build/ci.go +++ b/build/ci.go @@ -343,6 +343,7 @@ func buildFlags(env build.Environment, staticLinking bool, buildTags []string) ( } ld = append(ld, "-extldflags", "'"+strings.Join(extld, " ")+"'") } + // TODO(gballet): revisit after the input api has been defined if runtime.GOARCH == "wasm" { ld = append(ld, "-gcflags=all=-d=softfloat") }