LEFT | RIGHT |
1 // Copyright 2011 The Go Authors. All rights reserved. | 1 // Copyright 2011 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 package main | 5 package main |
6 | 6 |
7 import ( | 7 import ( |
8 "bytes" | 8 "bytes" |
9 "container/heap" | 9 "container/heap" |
10 "errors" | 10 "errors" |
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 | 571 |
572 // The actions run in parallel but all the updates to the | 572 // The actions run in parallel but all the updates to the |
573 // shared work state are serialized through b.exec. | 573 // shared work state are serialized through b.exec. |
574 b.exec.Lock() | 574 b.exec.Lock() |
575 defer b.exec.Unlock() | 575 defer b.exec.Unlock() |
576 | 576 |
577 if err != nil { | 577 if err != nil { |
578 if err == errPrintedOutput { | 578 if err == errPrintedOutput { |
579 setExitStatus(2) | 579 setExitStatus(2) |
580 } else { | 580 } else { |
581 println(err.Error()) | |
582 errorf("%s", err) | 581 errorf("%s", err) |
583 } | 582 } |
584 a.failed = true | 583 a.failed = true |
585 } | 584 } |
586 | 585 |
587 for _, a0 := range a.triggers { | 586 for _, a0 := range a.triggers { |
588 if a.failed { | 587 if a.failed { |
589 a0.failed = true | 588 a0.failed = true |
590 } | 589 } |
591 if a0.pending--; a0.pending == 0 { | 590 if a0.pending--; a0.pending == 0 { |
(...skipping 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1863 if goarch != "amd64" || goos != "linux" && goos != "darwin" && goos != "
windows" { | 1862 if goarch != "amd64" || goos != "linux" && goos != "darwin" && goos != "
windows" { |
1864 fmt.Fprintf(os.Stderr, "go %s: -race is only supported on linux/
amd64, darwin/amd64 and windows/amd64\n", flag.Args()[0]) | 1863 fmt.Fprintf(os.Stderr, "go %s: -race is only supported on linux/
amd64, darwin/amd64 and windows/amd64\n", flag.Args()[0]) |
1865 os.Exit(2) | 1864 os.Exit(2) |
1866 } | 1865 } |
1867 buildGcflags = append(buildGcflags, "-b") | 1866 buildGcflags = append(buildGcflags, "-b") |
1868 buildLdflags = append(buildLdflags, "-b") | 1867 buildLdflags = append(buildLdflags, "-b") |
1869 buildCcflags = append(buildCcflags, "-DRACE") | 1868 buildCcflags = append(buildCcflags, "-DRACE") |
1870 buildContext.InstallTag = "race" | 1869 buildContext.InstallTag = "race" |
1871 buildContext.BuildTags = append(buildContext.BuildTags, "race") | 1870 buildContext.BuildTags = append(buildContext.BuildTags, "race") |
1872 } | 1871 } |
LEFT | RIGHT |