Commit 6f8acd5f authored by Alex Brainman's avatar Alex Brainman

cmd/go: change error message to refer to correct bootstrap command

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/12317043
parent 97863bb8
...@@ -772,7 +772,7 @@ func (b *builder) build(a *action) (err error) { ...@@ -772,7 +772,7 @@ func (b *builder) build(a *action) (err error) {
if a.p.Standard && a.p.ImportPath == "runtime" && buildContext.Compiler == "gc" && if a.p.Standard && a.p.ImportPath == "runtime" && buildContext.Compiler == "gc" &&
!hasString(a.p.HFiles, "zasm_"+buildContext.GOOS+"_"+buildContext.GOARCH+".h") { !hasString(a.p.HFiles, "zasm_"+buildContext.GOOS+"_"+buildContext.GOARCH+".h") {
return fmt.Errorf("%s/%s must be bootstrapped using make.bash", buildContext.GOOS, buildContext.GOARCH) return fmt.Errorf("%s/%s must be bootstrapped using make%v", buildContext.GOOS, buildContext.GOARCH, defaultSuffix())
} }
// Make build directory. // Make build directory.
...@@ -2242,3 +2242,16 @@ func raceInit() { ...@@ -2242,3 +2242,16 @@ func raceInit() {
buildContext.InstallSuffix += "race" buildContext.InstallSuffix += "race"
buildContext.BuildTags = append(buildContext.BuildTags, "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"
}
}
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