diff options
author | Ayke van Laethem <[email protected]> | 2024-01-19 16:57:04 +0100 |
---|---|---|
committer | Ron Evans <[email protected]> | 2024-01-19 21:23:58 +0100 |
commit | 57f49af7267d8a3a299d93e035108590f88bbf66 (patch) | |
tree | df80f0017529672d5adb4262eeb741fc9606ba4a /compileopts | |
parent | 38a80b45d3f5eb07670a4d8fe075315920f2c712 (diff) | |
download | tinygo-57f49af7267d8a3a299d93e035108590f88bbf66.tar.gz tinygo-57f49af7267d8a3a299d93e035108590f88bbf66.zip |
loader: make sure Go version is plumbed through
This fixes the new loop variable behavior in Go 1.22.
Specifically:
* The compiler (actually, the x/tools/go/ssa package) now correctly
picks up the Go version.
* If a module doesn't specify the Go version, the current Go version
(from the `go` tool and standard library) is used. This fixes
`go run`.
* The tests in testdata/ that use a separate directory are now
actually run in that directory. This makes it possible to use a
go.mod file there.
* There is a test to make sure old Go modules still work with the old
Go behavior, even on a newer Go version.
Diffstat (limited to 'compileopts')
-rw-r--r-- | compileopts/options.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compileopts/options.go b/compileopts/options.go index bd99179c7..debdaf08c 100644 --- a/compileopts/options.go +++ b/compileopts/options.go @@ -23,6 +23,7 @@ type Options struct { GOOS string // environment variable GOARCH string // environment variable GOARM string // environment variable (only used with GOARCH=arm) + Directory string // working dir, leave it unset to use the current working dir Target string Opt string GC string @@ -48,7 +49,6 @@ type Options struct { Programmer string OpenOCDCommands []string LLVMFeatures string - Directory string PrintJSON bool Monitor bool BaudRate int |