mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-18 19:44:00 +00:00
Allow imports from GOROOT
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
|||||||
"go/token"
|
"go/token"
|
||||||
"go/types"
|
"go/types"
|
||||||
"os"
|
"os"
|
||||||
|
"runtime"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
@@ -137,6 +138,7 @@ func (c *Compiler) Parse(mainPath string, buildTags []string) error {
|
|||||||
GOARCH: tripleSplit[0],
|
GOARCH: tripleSplit[0],
|
||||||
GOOS: tripleSplit[2],
|
GOOS: tripleSplit[2],
|
||||||
GOROOT: ".",
|
GOROOT: ".",
|
||||||
|
GOPATH: runtime.GOROOT(),
|
||||||
CgoEnabled: true,
|
CgoEnabled: true,
|
||||||
UseAllFiles: false,
|
UseAllFiles: false,
|
||||||
Compiler: "gc", // must be one of the recognized compilers
|
Compiler: "gc", // must be one of the recognized compilers
|
||||||
|
|||||||
Reference in New Issue
Block a user