]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist,cmd/compile: remove -allabis mode
authorAustin Clements <austin@google.com>
Thu, 6 Jun 2019 21:27:14 +0000 (17:27 -0400)
committerAustin Clements <austin@google.com>
Fri, 7 Jun 2019 18:10:20 +0000 (18:10 +0000)
dist passes the -allabis flag to the compiler to avoid having to
recreate the cross-package ABI logic from cmd/go. However, we removed
that logic from cmd/go in CL 179863 and replaced it with a different
mechanism that doesn't depend on the build system. Hence, passing
-allabis in dist is no longer necessary.

This CL removes -allabis from dist and, since that was the only use of
it, removes support for it from the compiler as well.

Updates #31230.

Change-Id: Ib005db95755a7028f49c885785e72c3970aea4f9
Reviewed-on: https://go-review.googlesource.com/c/go/+/181079
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/cmd/compile/internal/gc/gsubr.go
src/cmd/compile/internal/gc/main.go
src/cmd/dist/build.go

index 827ccf3696ae91a367362c7fff93355674febce8..51c0fffc9ee3a3acac95aca8645a864007eab375 100644 (file)
@@ -234,17 +234,6 @@ func (f *Func) initLSym(hasBody bool) {
                        }
                }
 
-               if !needABIAlias && allABIs {
-                       // The compiler was asked to produce ABI
-                       // wrappers for everything.
-                       switch f.lsym.ABI() {
-                       case obj.ABI0:
-                               needABIAlias, aliasABI = true, obj.ABIInternal
-                       case obj.ABIInternal:
-                               needABIAlias, aliasABI = true, obj.ABI0
-                       }
-               }
-
                if needABIAlias {
                        // These LSyms have the same name as the
                        // native function, so we create them directly
index 37e755306d348da15823426c2725ae3ce8295e2b..2a1fd8e4fa55e9391c78e6c669dea36cd5b58aa4 100644 (file)
@@ -259,7 +259,6 @@ func Main(archInit func(*Arch)) {
        flag.StringVar(&goversion, "goversion", "", "required version of the runtime")
        var symabisPath string
        flag.StringVar(&symabisPath, "symabis", "", "read symbol ABIs from `file`")
-       flag.BoolVar(&allABIs, "allabis", false, "generate ABI wrappers for all symbols (for bootstrap)")
        flag.StringVar(&traceprofile, "traceprofile", "", "write an execution trace to `file`")
        flag.StringVar(&blockprofile, "blockprofile", "", "write block profile to `file`")
        flag.StringVar(&mutexprofile, "mutexprofile", "", "write mutex profile to `file`")
@@ -849,11 +848,6 @@ func readImportCfg(file string) {
 // name, where the local package prefix is always `"".`
 var symabiDefs, symabiRefs map[string]obj.ABI
 
-// allABIs indicates that all symbol definitions should have ABI
-// wrappers. This is used during toolchain bootstrapping to avoid
-// having to find cross-package references.
-var allABIs bool
-
 // readSymABIs reads a symabis file that specifies definitions and
 // references of text symbols by ABI.
 //
index 3df7f09abc7f7f0cfe4e0705dcaa5a924d65941a..9e503117ae6ab6b0ffec052e3363cf7fcf18f10e 100644 (file)
@@ -866,13 +866,6 @@ func runInstall(dir string, ch chan struct{}) {
        if symabis != "" {
                compile = append(compile, "-symabis", symabis)
        }
-       if dir == "runtime" || dir == "runtime/internal/atomic" {
-               // These packages define symbols referenced by
-               // assembly in other packages. In cmd/go, we work out
-               // the exact details. For bootstrapping, just tell the
-               // compiler to generate ABI wrappers for everything.
-               compile = append(compile, "-allabis")
-       }
        if goos == "android" {
                compile = append(compile, "-shared")
        }