diff options
author | deadprogram <[email protected]> | 2023-08-12 12:29:28 +0200 |
---|---|---|
committer | Ayke <[email protected]> | 2023-08-13 17:11:11 +0200 |
commit | 756cdf44ed5a83a0fd37a63bdf596328c279f4f7 (patch) | |
tree | fddd43fa81825b161edc774563283fdc405bc3ea | |
parent | 9037bf8bf0fd50bfffd110cbc79ea4a60ef4e781 (diff) | |
download | tinygo-756cdf44ed5a83a0fd37a63bdf596328c279f4f7.tar.gz tinygo-756cdf44ed5a83a0fd37a63bdf596328c279f4f7.zip |
loader: merge go.env file which is now required starting in Go 1.21 to correctly get required packages
Signed-off-by: deadprogram <[email protected]>
-rw-r--r-- | loader/goroot.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/loader/goroot.go b/loader/goroot.go index b6812badc..c1479b642 100644 --- a/loader/goroot.go +++ b/loader/goroot.go @@ -207,6 +207,11 @@ func listGorootMergeLinks(goroot, tinygoroot string, overrides map[string]bool) merges[dir] = filepath.Join(goroot, dir) } + // Required starting in Go 1.21 due to https://github.com/golang/go/issues/61928 + if _, err := os.Stat(filepath.Join(goroot, "go.env")); err == nil { + merges["go.env"] = filepath.Join(goroot, "go.env") + } + return merges, nil } |