</ul>
</li>
+
+<li><code>$GOWASM</code> (for <code>wasm</code> only)
+ <p>
+ This variable is a comma separated list of <a href="https://github.com/WebAssembly/proposals">experimental WebAssembly features</a> that the compiled WebAssembly binary is allowed to use.
+ The default is to use no experimental features.
+ </p>
+ <ul>
+ <li>(no features yet)</li>
+ </ul>
+</li>
+
</ul>
<p>
GOMIPS = objabi.GOMIPS
GOMIPS64 = objabi.GOMIPS64
GOPPC64 = fmt.Sprintf("%s%d", "power", objabi.GOPPC64)
+ GOWASM = objabi.GOWASM
)
// Update build context to use our computed GOROOT.
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)
GOMIPS = gomips()
GOMIPS64 = gomips64()
GOPPC64 = goppc64()
+ GOWASM = gowasm()
GO_LDSO = defaultGO_LDSO
Version = version
)
panic("unreachable")
}
+type gowasmFeatures struct {
+ // no features yet
+}
+
+func (f *gowasmFeatures) String() string {
+ var flags []string
+ // no features yet
+ return strings.Join(flags, ",")
+}
+
+func gowasm() (f gowasmFeatures) {
+ for _, opt := range strings.Split(envOr("GOWASM", ""), ",") {
+ switch opt {
+ // no features yet
+ case "":
+ // ignore
+ default:
+ log.Fatalf("Invalid GOWASM value. No such feature: " + opt)
+ }
+ }
+ return
+}
+
func Getgoextlinkenabled() string {
return envOr("GO_EXTLINK_ENABLED", defaultGO_EXTLINK_ENABLED)
}