From ce0d8dfad3d0eff7928f07bb63832c306b524b93 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 8ae5ce316a..a6178dc529 100644 --- a/main.go +++ b/main.go @@ -1685,9 +1685,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)