From d80668bd931be9460777ec7e4d4bd3d5f8b4b49a Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Thu, 29 Aug 2024 13:39:39 +0200 Subject: [PATCH] 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 --- main.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/main.go b/main.go index 51e62aaaee..cce1e29fea 100644 --- a/main.go +++ b/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)