]> Cypherpunks repositories - gostls13.git/commitdiff
all: add wasip1 definitions
authorJohan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
Sat, 25 Mar 2023 05:44:01 +0000 (22:44 -0700)
committerGopher Robot <gobot@golang.org>
Thu, 30 Mar 2023 18:50:57 +0000 (18:50 +0000)
Add wasip1 GOOS definitions to the compiler and build
definitions.

Co-authored-by: Richard Musiol <neelance@gmail.com>
Co-authored-by: Achille Roussel <achille.roussel@gmail.com>
Co-authored-by: Julien Fabre <ju.pryz@gmail.com>
Co-authored-by: Evan Phoenix <evan@phx.io>
Change-Id: I087e7ff4205a34187bbca18b1693ad911ddd1219
Reviewed-on: https://go-review.googlesource.com/c/go/+/479616
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Auto-Submit: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
Run-TryBot: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
21 files changed:
src/cmd/dist/build.go
src/cmd/go/internal/imports/build.go
src/cmd/internal/objabi/head.go
src/go/build/syslist.go
src/internal/goos/zgoos_aix.go
src/internal/goos/zgoos_android.go
src/internal/goos/zgoos_darwin.go
src/internal/goos/zgoos_dragonfly.go
src/internal/goos/zgoos_freebsd.go
src/internal/goos/zgoos_hurd.go
src/internal/goos/zgoos_illumos.go
src/internal/goos/zgoos_ios.go
src/internal/goos/zgoos_js.go
src/internal/goos/zgoos_linux.go
src/internal/goos/zgoos_netbsd.go
src/internal/goos/zgoos_openbsd.go
src/internal/goos/zgoos_plan9.go
src/internal/goos/zgoos_solaris.go
src/internal/goos/zgoos_wasip1.go [new file with mode: 0644]
src/internal/goos/zgoos_windows.go
src/internal/goos/zgoos_zos.go

index 448cf0e592a357b92c8c13cf79f67ed91bb68a82..c184ffca993609449764c5c3e066f139c7d92a1d 100644 (file)
@@ -86,6 +86,7 @@ var okgoos = []string{
        "illumos",
        "ios",
        "js",
+       "wasip1",
        "linux",
        "android",
        "solaris",
@@ -1703,6 +1704,7 @@ var cgoEnabled = map[string]bool{
        "ios/arm64":       true,
        "ios/amd64":       true,
        "js/wasm":         false,
+       "wasip1/wasm":     false,
        "netbsd/386":      true,
        "netbsd/amd64":    true,
        "netbsd/arm":      true,
index be308ceeec6cd1bb9703eda17bf54cb8860d4c7b..3a4a66b8699c7cc075248064670829e9a0cde529 100644 (file)
@@ -323,6 +323,7 @@ var KnownOS = map[string]bool{
        "openbsd":   true,
        "plan9":     true,
        "solaris":   true,
+       "wasip1":    true,
        "windows":   true,
        "zos":       true,
 }
index 763910fbd6d2e804bcb895904cfb634e2a9aeada..3109b5cb23f12ae3e7a89edd9c37cfe3c036df7b 100644 (file)
@@ -46,6 +46,7 @@ const (
        Hopenbsd
        Hplan9
        Hsolaris
+       Hwasip1
        Hwindows
        Haix
 )
@@ -72,6 +73,8 @@ func (h *HeadType) Set(s string) error {
                *h = Hplan9
        case "illumos", "solaris":
                *h = Hsolaris
+       case "wasip1":
+               *h = Hwasip1
        case "windows":
                *h = Hwindows
        default:
@@ -102,6 +105,8 @@ func (h HeadType) String() string {
                return "plan9"
        case Hsolaris:
                return "solaris"
+       case Hwasip1:
+               return "wasip1"
        case Hwindows:
                return "windows"
        }
index 78ca565ce207f8f149526d1cf354de148df079b7..783bbe697a32d7bc4e884e62a56f5e23c2db7a93 100644 (file)
@@ -27,6 +27,7 @@ var knownOS = map[string]bool{
        "openbsd":   true,
        "plan9":     true,
        "solaris":   true,
+       "wasip1":    true,
        "windows":   true,
        "zos":       true,
 }
index ff861550c4851ab7dbb33b9059ec14e88b744adf..24e05c933e5e752cadea93db410ef012ee137562 100644 (file)
@@ -21,5 +21,6 @@ const IsNetbsd = 0
 const IsOpenbsd = 0
 const IsPlan9 = 0
 const IsSolaris = 0
+const IsWasip1 = 0
 const IsWindows = 0
 const IsZos = 0
index e8aaa1242842d15db905685340b820e047a6a149..3c4a318590a8bb903588994922bf5f772c774562 100644 (file)
@@ -21,5 +21,6 @@ const IsNetbsd = 0
 const IsOpenbsd = 0
 const IsPlan9 = 0
 const IsSolaris = 0
+const IsWasip1 = 0
 const IsWindows = 0
 const IsZos = 0
index decdd496425c7fb3c8424547d2f765fbc46c89e2..10b14998955126a439dca5a1d223fb6356df22c7 100644 (file)
@@ -21,5 +21,6 @@ const IsNetbsd = 0
 const IsOpenbsd = 0
 const IsPlan9 = 0
 const IsSolaris = 0
+const IsWasip1 = 0
 const IsWindows = 0
 const IsZos = 0
index 2224baa2301831deaf4ac21f3fb4e9403be693c5..b92d1269f1f2864a80f41620d237711e54fc325f 100644 (file)
@@ -21,5 +21,6 @@ const IsNetbsd = 0
 const IsOpenbsd = 0
 const IsPlan9 = 0
 const IsSolaris = 0
+const IsWasip1 = 0
 const IsWindows = 0
 const IsZos = 0
index 3ee5bf998e21c3303edb6b789cf8908205010a5c..f547591ab1e521268fce6897cfd80f8f8a8ff3cd 100644 (file)
@@ -21,5 +21,6 @@ const IsNetbsd = 0
 const IsOpenbsd = 0
 const IsPlan9 = 0
 const IsSolaris = 0
+const IsWasip1 = 0
 const IsWindows = 0
 const IsZos = 0
index 8a3d34304d8f7f8f4d848ceb0f0780f68a099bbf..1189d65d74599e7eb03d3b10196d72e53693905b 100644 (file)
@@ -21,5 +21,6 @@ const IsNetbsd = 0
 const IsOpenbsd = 0
 const IsPlan9 = 0
 const IsSolaris = 0
+const IsWasip1 = 0
 const IsWindows = 0
 const IsZos = 0
index fc1b9a9e22fcc7eab192c68f0a6a38ec7d431c65..4f0254081c31f1ccd572d99b760813b86c4b51e6 100644 (file)
@@ -21,5 +21,6 @@ const IsNetbsd = 0
 const IsOpenbsd = 0
 const IsPlan9 = 0
 const IsSolaris = 0
+const IsWasip1 = 0
 const IsWindows = 0
 const IsZos = 0
index 746e769ef766a0cdb9864a2b3b05b21837136021..02f3586fa4017755f8e74cbe1a7be5182e9c22d8 100644 (file)
@@ -21,5 +21,6 @@ const IsNetbsd = 0
 const IsOpenbsd = 0
 const IsPlan9 = 0
 const IsSolaris = 0
+const IsWasip1 = 0
 const IsWindows = 0
 const IsZos = 0
index 6cf2a5d9e27133923e00735fea0cee949fc0e2d7..481874189199116e973c1ae562648ff6ef060c8a 100644 (file)
@@ -21,5 +21,6 @@ const IsNetbsd = 0
 const IsOpenbsd = 0
 const IsPlan9 = 0
 const IsSolaris = 0
+const IsWasip1 = 0
 const IsWindows = 0
 const IsZos = 0
index cb9d6e8afaa90556587b7bb9fd1dd0acb85b9b76..6f4d4e07530a92a6d9ef8eeb62e65cb5ed145e14 100644 (file)
@@ -21,5 +21,6 @@ const IsNetbsd = 0
 const IsOpenbsd = 0
 const IsPlan9 = 0
 const IsSolaris = 0
+const IsWasip1 = 0
 const IsWindows = 0
 const IsZos = 0
index 8285928d3504716df16cdc89b1aa05d65a9f1dc8..948603df0df73bcc7c6243e0e30495cc59418bd3 100644 (file)
@@ -21,5 +21,6 @@ const IsNetbsd = 1
 const IsOpenbsd = 0
 const IsPlan9 = 0
 const IsSolaris = 0
+const IsWasip1 = 0
 const IsWindows = 0
 const IsZos = 0
index 3f739a4a2f728c071ba30786423a6bafcbed08fe..f4b201457b59a41315657a98bb6409057836b941 100644 (file)
@@ -21,5 +21,6 @@ const IsNetbsd = 0
 const IsOpenbsd = 1
 const IsPlan9 = 0
 const IsSolaris = 0
+const IsWasip1 = 0
 const IsWindows = 0
 const IsZos = 0
index d4c1c651f7bf881b28b65e63d461fe4caee6e208..95572dff37067da0cdbd00df59ec34de9f997e57 100644 (file)
@@ -21,5 +21,6 @@ const IsNetbsd = 0
 const IsOpenbsd = 0
 const IsPlan9 = 1
 const IsSolaris = 0
+const IsWasip1 = 0
 const IsWindows = 0
 const IsZos = 0
index 69e3285ab620465adadcc4c8c341b64ef40f199e..c7058260f8e0d166817ed8a7daa20696bfbe3ded 100644 (file)
@@ -21,5 +21,6 @@ const IsNetbsd = 0
 const IsOpenbsd = 0
 const IsPlan9 = 0
 const IsSolaris = 1
+const IsWasip1 = 0
 const IsWindows = 0
 const IsZos = 0
diff --git a/src/internal/goos/zgoos_wasip1.go b/src/internal/goos/zgoos_wasip1.go
new file mode 100644 (file)
index 0000000..ae35eeb
--- /dev/null
@@ -0,0 +1,26 @@
+// Code generated by gengoos.go using 'go generate'. DO NOT EDIT.
+
+//go:build wasip1
+
+package goos
+
+const GOOS = `wasip1`
+
+const IsAix = 0
+const IsAndroid = 0
+const IsDarwin = 0
+const IsDragonfly = 0
+const IsFreebsd = 0
+const IsHurd = 0
+const IsIllumos = 0
+const IsIos = 0
+const IsJs = 0
+const IsLinux = 0
+const IsNacl = 0
+const IsNetbsd = 0
+const IsOpenbsd = 0
+const IsPlan9 = 0
+const IsSolaris = 0
+const IsWasip1 = 1
+const IsWindows = 0
+const IsZos = 0
index 16158be78b97e8f85e97754aff88fc02ab27f9d9..f89f4cf82946594325e8b4221a27ce68c2faf806 100644 (file)
@@ -21,5 +21,6 @@ const IsNetbsd = 0
 const IsOpenbsd = 0
 const IsPlan9 = 0
 const IsSolaris = 0
+const IsWasip1 = 0
 const IsWindows = 1
 const IsZos = 0
index fb6165c7a12ec8f4269c0e672933448a99ad9046..29fb0f8babbbd0110366839ce261b98016b4c9e6 100644 (file)
@@ -21,5 +21,6 @@ const IsNetbsd = 0
 const IsOpenbsd = 0
 const IsPlan9 = 0
 const IsSolaris = 0
+const IsWasip1 = 0
 const IsWindows = 0
 const IsZos = 1