mirror of
https://github.com/golang/go
synced 2024-11-12 10:00:25 -07:00
cmd/go: fix data race during build
Fixes #2695. R=golang-dev, mpimenov, minux.ma, rsc CC=golang-dev https://golang.org/cl/5545052
This commit is contained in:
parent
c7cdce13f5
commit
a4f7024e0a
@ -873,6 +873,8 @@ func (b *builder) runOut(dir string, desc string, cmdargs ...interface{}) ([]byt
|
||||
|
||||
// mkdir makes the named directory.
|
||||
func (b *builder) mkdir(dir string) error {
|
||||
b.exec.Lock()
|
||||
defer b.exec.Unlock()
|
||||
// We can be a little aggressive about being
|
||||
// sure directories exist. Skip repeated calls.
|
||||
if b.mkdirCache[dir] {
|
||||
|
Loading…
Reference in New Issue
Block a user