Browse Source

main: don't detect WebAssembly from the .wasm extension

Currently this overrides GOOS/GOARCH, which are also used for wasm.
This will break people who rely on a command like this:

    tinygo build -o foo.wasm path/to/package

They will need to update to explicitly set the target, for example:

    tinygo build -o foo.wasm -target=wasm path/to/package

Fixes: https://github.com/tinygo-org/tinygo/issues/4439
wasm-extension
Ayke van Laethem 2 months ago
parent
commit
d80668bd93
  1. 3
      main.go

3
main.go

@ -1564,9 +1564,6 @@ func main() {
usage(command)
os.Exit(1)
}
if options.Target == "" && filepath.Ext(outpath) == ".wasm" {
options.Target = "wasm"
}
err := Build(pkgName, outpath, options)
handleCompilerError(err)

Loading…
Cancel
Save