Commit 38a03de6 authored by Russ Cox's avatar Russ Cox

go/build: move code around

Only copy+paste here.
Will make next code review's diffs a bit smaller.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5704050
parent 6e2ae0a1
This diff is collapsed.
This diff is collapsed.
......@@ -12,9 +12,6 @@ import (
"runtime"
)
// ToolDir is the directory containing build tools.
var ToolDir = filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH)
// Path is a validated list of Trees derived from $GOROOT and $GOPATH at init.
var Path []*Tree
......@@ -128,16 +125,6 @@ func FindTree(path string) (tree *Tree, pkg string, err error) {
return
}
// isLocalPath returns whether the given path is local (/foo ./foo ../foo . ..)
// Windows paths that starts with drive letter (c:\foo c:foo) are considered local.
func isLocalPath(s string) bool {
const sep = string(filepath.Separator)
return s == "." || s == ".." ||
filepath.HasPrefix(s, sep) ||
filepath.HasPrefix(s, "."+sep) || filepath.HasPrefix(s, ".."+sep) ||
filepath.VolumeName(s) != ""
}
var (
// argument lists used by the build's gc and ld methods
gcImportArgs []string
......
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