diff options
| author | Matthew Dempsky <mdempsky@google.com> | 2021-05-07 22:51:29 -0700 |
|---|---|---|
| committer | Matthew Dempsky <mdempsky@google.com> | 2021-05-09 02:47:29 +0000 |
| commit | 5203357ebacf9f41ca5e194d953c164049172e96 (patch) | |
| tree | df6168965db62fbbb07904e118a43ae7cf766df2 /src/syscall/exec_libc2.go | |
| parent | ea93e6885847b50bf4e6d3f263843f9c4e8d15f8 (diff) | |
| download | go-5203357ebacf9f41ca5e194d953c164049172e96.tar.xz | |
cmd/compile: make non-concurrent compiles deterministic again
Spreading function compilation across multiple goroutines results in
non-deterministic output. This is how cmd/compile has historically
behaved for concurrent builds, but is troublesome for non-concurrent
builds, particularly because it interferes with "toolstash -cmp".
I spent some time trying to think of a simple, unified algorithm that
can concurrently schedule work but gracefully degrades to a
deterministic build for single-worker builds, but I couldn't come up
with any. The simplest idea I found was to simply abstract away the
operation of scheduling work so that we can have alternative
deterministic vs concurrent modes.
Change-Id: I08afa00527ce1844432412f4f8553781c4e323df
Reviewed-on: https://go-review.googlesource.com/c/go/+/318229
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Diffstat (limited to 'src/syscall/exec_libc2.go')
0 files changed, 0 insertions, 0 deletions
