diff options
-rw-r--r-- | builder/build.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/builder/build.go b/builder/build.go index cd292e0bc..e543fedbb 100644 --- a/builder/build.go +++ b/builder/build.go @@ -300,7 +300,13 @@ func Build(pkgName, outpath string, config *compileopts.Config, action func(Buil if err != nil { return err } - return os.Rename(f.Name(), bitcodePath) + + // Rename may fail if another process is trying to write to + // the same file. However, in this case, the failure is + // acceptable because the result of the other process can be + // used. + os.Rename(f.Name(), bitcodePath) + return nil }, } jobs = append(jobs, job) |