Skip to content

Commit

Permalink
cmd/go,cmd/compile: re-enable concurrent compilation on darwin/arm64
Browse files Browse the repository at this point in the history
I've manually reviewed all uses of ctxt.Flag_shared for concurrency safety.
And I manually tested with the race detector and found no issues.
Allow -shared to be used with compiler concurrency,
thereby re-enabling concurrent compilation on darwin/arm64.

Fixes golang#48496

Change-Id: I8a084cb08e6050950e404ceb9bd7e3a20e07e9c5
Reviewed-on: https://go-review.googlesource.com/c/go/+/353871
Trust: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
  • Loading branch information
josharian committed Oct 4, 2021
1 parent 7d822af commit 579ff8b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/cmd/compile/internal/base/flag.go
Expand Up @@ -357,7 +357,7 @@ func concurrentBackendAllowed() bool {
return false
}
// TODO: fix races and enable the following flags
if Ctxt.Flag_shared || Ctxt.Flag_dynlink || Flag.Race {
if Ctxt.Flag_dynlink || Flag.Race {
return false
}
return true
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/go/internal/work/gc.go
Expand Up @@ -234,7 +234,7 @@ CheckFlags:
// except for known commonly used flags.
// If the user knows better, they can manually add their own -c to the gcflags.
switch flag {
case "-N", "-l", "-S", "-B", "-C", "-I":
case "-N", "-l", "-S", "-B", "-C", "-I", "-shared":
// OK
default:
canDashC = false
Expand Down

0 comments on commit 579ff8b

Please sign in to comment.