Skip to content

Commit

Permalink
cmd/go: remove the bootstrap with make.bash error message
Browse files Browse the repository at this point in the history
The runtime/zgoos_$GOOS.go and runtime/zgoarch_$GOARCH.go files
are in the repository now, so the message is actually incorrect
(running make.bash won't generate those). The reason is probably
wrong $GOROOT.

Change-Id: I8dc125594c52d666eca91fd5af48b60d12d599b8
Reviewed-on: https://go-review.googlesource.com/15221
Reviewed-by: Ian Lance Taylor <[email protected]>
  • Loading branch information
minux committed Oct 4, 2015
1 parent 62491ff commit f78a4c8
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions src/cmd/go/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -1235,12 +1235,6 @@ func (b *builder) build(a *action) (err error) {
fmt.Fprintf(os.Stderr, "%s\n", a.p.ImportPath)
}

if a.p.Standard && a.p.ImportPath == "runtime" && buildContext.Compiler == "gc" &&
(!hasString(a.p.GoFiles, "zgoos_"+buildContext.GOOS+".go") ||
!hasString(a.p.GoFiles, "zgoarch_"+buildContext.GOARCH+".go")) {
return fmt.Errorf("%s/%s must be bootstrapped using make%v", buildContext.GOOS, buildContext.GOARCH, defaultSuffix())
}

// Make build directory.
obj := a.objdir
if err := b.mkdir(obj); err != nil {
Expand Down Expand Up @@ -3355,16 +3349,3 @@ func raceInit() {
buildContext.InstallSuffix += "race"
buildContext.BuildTags = append(buildContext.BuildTags, "race")
}

// defaultSuffix returns file extension used for command files in
// current os environment.
func defaultSuffix() string {
switch runtime.GOOS {
case "windows":
return ".bat"
case "plan9":
return ".rc"
default:
return ".bash"
}
}

0 comments on commit f78a4c8

Please sign in to comment.