Skip to content

Commit 579ff8b

Browse files
committed
cmd/go,cmd/compile: re-enable concurrent compilation on darwin/arm64
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 #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>
1 parent 7d822af commit 579ff8b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/cmd/compile/internal/base/flag.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ func concurrentBackendAllowed() bool {
357357
return false
358358
}
359359
// TODO: fix races and enable the following flags
360-
if Ctxt.Flag_shared || Ctxt.Flag_dynlink || Flag.Race {
360+
if Ctxt.Flag_dynlink || Flag.Race {
361361
return false
362362
}
363363
return true

src/cmd/go/internal/work/gc.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ CheckFlags:
234234
// except for known commonly used flags.
235235
// If the user knows better, they can manually add their own -c to the gcflags.
236236
switch flag {
237-
case "-N", "-l", "-S", "-B", "-C", "-I":
237+
case "-N", "-l", "-S", "-B", "-C", "-I", "-shared":
238238
// OK
239239
default:
240240
canDashC = false

0 commit comments

Comments
 (0)