]> Cypherpunks repositories - gostls13.git/commitdiff
go/src/cmd/go/internal/work: compile "internal/abi" with "-+"
authorHimanshu Kishna Srivastava <28himanshu@gmail.com>
Wed, 31 Mar 2021 15:52:49 +0000 (21:22 +0530)
committerMatthew Dempsky <mdempsky@google.com>
Fri, 2 Apr 2021 15:46:42 +0000 (15:46 +0000)
"internal/abi" package depends on runtime package and are supposed to
compile with "-+" option.Added internal/abi in the known list of package
that runtime depends on,so that "internal/abi" compiles with "-+".

Fixes #45144

Change-Id: Iad9e2589f2fbd014260cb8ef9f943d2126015fe1
Reviewed-on: https://go-review.googlesource.com/c/go/+/306289
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>

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

index c71196469bc9df73a1cc8e4aa47769f43956b499..7ccba4a56155809490696794f7a5914cc38c2801 100644 (file)
@@ -89,7 +89,7 @@ func (gcToolchain) gc(b *Builder, a *Action, archive string, importcfg, embedcfg
        }
        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") {
+       if p.Standard && (p.ImportPath == "internal/cpu" || p.ImportPath == "internal/bytealg" || p.ImportPath == "internal/abi") {
                compilingRuntime = true
        }
        if compilingRuntime {