diff options
author | Richard Musiol <mail@richard-musiol.de> | 2019-03-23 14:18:19 +0100 |
---|---|---|
committer | Richard Musiol <neelance@gmail.com> | 2019-03-23 20:33:57 +0000 |
commit | b434bbf197b3683643d4d6b52bca687982e336b5 (patch) | |
tree | 2f58d67db593aa97a598b80348cf7a5f0e7abdc2 /src/cmd/go/internal/envcmd/env.go | |
parent | 2396101e0590cb7d77556924249c26af0ccd9eff (diff) | |
download | go-b434bbf197b3683643d4d6b52bca687982e336b5.tar.gz go-b434bbf197b3683643d4d6b52bca687982e336b5.zip |
cmd/go: add GOWASM environment variable
This change adds the environment variable GOWASM, which is a comma
separated list of experimental WebAssembly features that the compiled
WebAssembly binary is allowed to use. The default is to use no
experimental features. Initially there are no features avaiable.
More information about feature proposals can be found at
https://github.com/WebAssembly/proposals
Change-Id: I4c8dc534c99ecff8bb075dded0186ca8f8decaef
Reviewed-on: https://go-review.googlesource.com/c/go/+/168881
Run-TryBot: Richard Musiol <neelance@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/cmd/go/internal/envcmd/env.go')
-rw-r--r-- | src/cmd/go/internal/envcmd/env.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cmd/go/internal/envcmd/env.go b/src/cmd/go/internal/envcmd/env.go index 08291dfb14..645f83246a 100644 --- a/src/cmd/go/internal/envcmd/env.go +++ b/src/cmd/go/internal/envcmd/env.go @@ -83,6 +83,8 @@ func MkEnv() []cfg.EnvVar { env = append(env, cfg.EnvVar{Name: "GOMIPS64", Value: cfg.GOMIPS64}) case "ppc64", "ppc64le": env = append(env, cfg.EnvVar{Name: "GOPPC64", Value: cfg.GOPPC64}) + case "wasm": + env = append(env, cfg.EnvVar{Name: "GOWASM", Value: cfg.GOWASM.String()}) } cc := cfg.DefaultCC(cfg.Goos, cfg.Goarch) |