diff options
author | Randy Reddig <[email protected]> | 2024-03-04 10:26:41 -0800 |
---|---|---|
committer | Ron Evans <[email protected]> | 2024-03-27 16:01:40 +0100 |
commit | 8e8ad9004f165716e64676ec534def097594484a (patch) | |
tree | dc2c799469dad10a48bdb12de056387d6d52709a /main.go | |
parent | 62d8cdb218ff4ff37998ad91f9f9e9e146f70271 (diff) | |
download | tinygo-8e8ad9004f165716e64676ec534def097594484a.tar.gz tinygo-8e8ad9004f165716e64676ec534def097594484a.zip |
all: replace target=wasi with target=wasip1
This eliminates the 'wasi' build tag in favor of 'GOOS=wasip1', introduced in Go 1.21.
For backwards compatablity, -target=wasi is a synonym for -target=wasip1.
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -285,7 +285,7 @@ func Test(pkgName string, stdout, stderr io.Writer, options *compileopts.Options // Tests are always run in the package directory. cmd.Dir = result.MainDir - // wasmtime is the default emulator used for `-target=wasi`. wasmtime + // wasmtime is the default emulator used for `-target=wasip1`. wasmtime // is a WebAssembly runtime CLI with WASI enabled by default. However, // only stdio are allowed by default. For example, while STDOUT routes // to the host, other files don't. It also does not inherit environment @@ -1548,6 +1548,11 @@ func main() { options.PrintCommands = printCommand } + // Compatibility with legacy -target=wasi + if options.Target == "wasi" { + options.Target = "wasip1" + } + err = options.Verify() if err != nil { fmt.Fprintln(os.Stderr, err.Error()) |