go.tools/dashboard/builder: only download gcc once for gccgo buildTool.
Downloading the GCC repo takes a lot of time and everything works fine if we just store it in the buildRoot and reuse it. R=golang-dev, adg CC=golang-dev https://golang.org/cl/13583045
This commit is contained in:
parent
dfaa5cc0c1
commit
b25f3012f3
|
@ -126,21 +126,27 @@ func (env *goEnv) setup(repo *Repo, workpath, hash string, envv []string) (strin
|
||||||
type gccgoEnv struct{}
|
type gccgoEnv struct{}
|
||||||
|
|
||||||
// setup for a gccgoEnv clones the gofrontend repo to workpath/go at the hash
|
// setup for a gccgoEnv clones the gofrontend repo to workpath/go at the hash
|
||||||
// and clones the latest GCC branch to workpath/gcc. The gccgo sources are
|
// and clones the latest GCC branch to repo.Path/gcc. The gccgo sources are
|
||||||
// replaced with the updated sources in the gofrontend repo and gcc gets
|
// replaced with the updated sources in the gofrontend repo and gcc gets
|
||||||
// gets configured and built in workpath/gcc-objdir. The path to
|
// gets configured and built in workpath/gcc-objdir. The path to
|
||||||
// workpath/gcc-objdir is returned.
|
// workpath/gcc-objdir is returned.
|
||||||
func (env *gccgoEnv) setup(repo *Repo, workpath, hash string, envv []string) (string, error) {
|
func (env *gccgoEnv) setup(repo *Repo, workpath, hash string, envv []string) (string, error) {
|
||||||
gofrontendpath := filepath.Join(workpath, "gofrontend")
|
gofrontendpath := filepath.Join(workpath, "gofrontend")
|
||||||
gccpath := filepath.Join(workpath, "gcc")
|
gccpath := filepath.Join(repo.Path, "gcc")
|
||||||
|
|
||||||
// get a handle to SVN vcs.Cmd for pulling down GCC.
|
// get a handle to SVN vcs.Cmd for pulling down GCC.
|
||||||
svn := vcs.ByCmd("svn")
|
svn := vcs.ByCmd("svn")
|
||||||
|
|
||||||
if err := timeout(*cmdTimeout, func() error {
|
// only pull down gcc if we don't have a local copy.
|
||||||
// pull down a working copy of GCC.
|
if _, err := os.Stat(gccpath); err != nil {
|
||||||
return svn.Create(gccpath, *gccPath)
|
if err := timeout(*cmdTimeout, func() error {
|
||||||
}); err != nil {
|
// pull down a working copy of GCC.
|
||||||
|
return svn.Create(gccpath, *gccPath)
|
||||||
|
}); err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if err := svn.Download(gccpath); err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue