-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Closed
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.release-blocker
Milestone
Description
Packages that package runtime depends on are supposed to be compiled with -+
so the compiler knows to do some runtime-specific behavior. cmd/go has a hard-coded list of known packages that runtime depends on, but this wasn't updated when "internal/abi" was added:
go/src/cmd/go/internal/work/gc.go
Lines 90 to 100 in e0fae78
compilingRuntime := p.Standard && (p.ImportPath == "runtime" || strings.HasPrefix(p.ImportPath, "runtime/internal")) | |
// The runtime package imports a couple of general internal packages. | |
if p.Standard && (p.ImportPath == "internal/cpu" || p.ImportPath == "internal/bytealg") { | |
compilingRuntime = true | |
} | |
if compilingRuntime { | |
// runtime compiles with a special gc flag to check for | |
// memory allocations that are invalid in the runtime package, | |
// and to implement some special compiler pragmas. | |
gcargs = append(gcargs, "-+") | |
} |
We should update the list, and add a test to make sure they don't fall out of sync again in the future.
Alternatively, cmd/go can just use its knowledge of which packages runtime depends on.
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.release-blocker
Type
Projects
Relationships
Development
Select code repository
Activity
gopherbot commentedon Mar 31, 2021
Change https://golang.org/cl/306289 mentions this issue:
go/src/cmd/go/internal/work: compile "internal/abi" with "-+"
go/src/cmd/go/internal/work: compile "internal/abi" with "-+"