From 789252beac65bba16b673d44403286ba03f5b0a1 Mon Sep 17 00:00:00 2001 From: Tyler Rockwood Date: Thu, 15 Aug 2024 13:31:33 -0500 Subject: [PATCH] Support GOOS=wasip1 This is a new GOOS that is live as of golang 1.20 See: https://go.dev/blog/wasi --- go/private/platforms.bzl | 1 + go/tools/internal/stdlib_tags/stdlib_tags.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go/private/platforms.bzl b/go/private/platforms.bzl index 761969ef8a..0a1e343f1d 100644 --- a/go/private/platforms.bzl +++ b/go/private/platforms.bzl @@ -90,6 +90,7 @@ GOOS_GOARCH = ( ("plan9", "amd64"), ("plan9", "arm"), ("solaris", "amd64"), + ("wasip1", "wasm"), ("windows", "386"), ("windows", "amd64"), ("windows", "arm"), diff --git a/go/tools/internal/stdlib_tags/stdlib_tags.go b/go/tools/internal/stdlib_tags/stdlib_tags.go index 8bd507af3a..dfb9745b75 100644 --- a/go/tools/internal/stdlib_tags/stdlib_tags.go +++ b/go/tools/internal/stdlib_tags/stdlib_tags.go @@ -125,7 +125,7 @@ func isConstraint(line string) bool { } // Taken from -// https://github.com/golang/go/blob/3d5391ed87d813110e10b954c62bf7ed578b591f/src/go/build/syslist.go +// https://github.com/golang/go/blob/2693f77b3583585172810427e12a634b28d34493/src/internal/syslist/syslist.go var knownOS = map[string]bool{ "aix": true, "android": true, @@ -142,6 +142,7 @@ var knownOS = map[string]bool{ "openbsd": true, "plan9": true, "solaris": true, + "wasip1": true, "windows": true, "zos": true, }