Commit 0f0d0eaa by Ian Lance Taylor

cmd/go: don't require GOROOT to exist for gccgo

    
    Reviewed-on: https://go-review.googlesource.com/46590

From-SVN: r249609
parent 8845cb37
c49ba1ca392b3c23a4b3934e0a95a908b1dc2f1d fc0cfdff94ca1099421900f43837ca5a70189cd6
The first line of this file holds the git revision number of the last The first line of this file holds the git revision number of the last
merge done from the gofrontend repository. merge done from the gofrontend repository.
...@@ -155,9 +155,14 @@ func main() { ...@@ -155,9 +155,14 @@ func main() {
} }
if fi, err := os.Stat(goroot); err != nil || !fi.IsDir() { if fi, err := os.Stat(goroot); err != nil || !fi.IsDir() {
// For gccgo this is fine, carry on.
// Note that this check is imperfect as we have not yet
// parsed the -compiler flag.
if runtime.Compiler != "gccgo" {
fmt.Fprintf(os.Stderr, "go: cannot find GOROOT directory: %v\n", goroot) fmt.Fprintf(os.Stderr, "go: cannot find GOROOT directory: %v\n", goroot)
os.Exit(2) os.Exit(2)
} }
}
// Set environment (GOOS, GOARCH, etc) explicitly. // Set environment (GOOS, GOARCH, etc) explicitly.
// In theory all the commands we invoke should have // In theory all the commands we invoke should have
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment