Try to make GOROOT relative in Go 1.10
In Go 1.10, runtime.GOROOT() will attempt to find the current location of the go binaries, instead of using the GOROOT_FINAL that was baked into the binaries. This means that GOROOT() will usually return an absolute path. We avoid putting absolute paths into the ninja file, since any change to the paths would then cause all of the actions including it to rebuild. Since we've got a decent number of build tools in Android using Go now, this causes us to rebuild a decent portion of the tree. Instead of passing the GOROOT around manually in a side channel, just let the Go 1.10 detection do its thing, and always try to turn the result into a relative path.
Loading
Please register or sign in to comment