]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/asm: rename -symabis to -gensymabis
authorAustin Clements <austin@google.com>
Thu, 15 Nov 2018 20:23:48 +0000 (15:23 -0500)
committerAustin Clements <austin@google.com>
Fri, 16 Nov 2018 21:57:50 +0000 (21:57 +0000)
Currently, both asm and compile have a -symabis flag, but in asm it's
a boolean flag that means to generate a symbol ABIs file and in the
compiler its a string flag giving the path of the symbol ABIs file to
consume. I'm worried about this false symmetry biting us in the
future, so rename asm's flag to -gensymabis.

Updates #27539.

Change-Id: I8b9c18a852d2838099718f8989813f19d82e7434
Reviewed-on: https://go-review.googlesource.com/c/149818
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/asm/doc.go
src/cmd/asm/internal/flags/flags.go
src/cmd/dist/build.go
src/cmd/go/internal/work/gc.go
test/run.go

index c39cab3c1958534e92737c4860178d31de77a51a..8bf0acac25f79774f65e45bdb116e395b81ae513 100644 (file)
@@ -39,6 +39,8 @@ Flags:
                Generate code that can be linked into a shared library.
        -trimpath prefix
                Remove prefix from recorded source file paths.
+       -gensymabis
+               Write symbol ABI information to output file. Don't assemble.
 Input language:
 
 The assembler uses mostly the same syntax for all architectures,
index 752a1d45265d3f72c7b4fcfc4b5656d389fd6d2a..5fe3fd9d53c6f04afb8bce2d7750a99a423751fd 100644 (file)
@@ -22,7 +22,7 @@ var (
        Shared     = flag.Bool("shared", false, "generate code that can be linked into a shared library")
        Dynlink    = flag.Bool("dynlink", false, "support references to Go symbols defined in other shared libraries")
        AllErrors  = flag.Bool("e", false, "no limit on number of errors reported")
-       SymABIs    = flag.Bool("symabis", false, "write symbol ABI information to output file, don't assemble")
+       SymABIs    = flag.Bool("gensymabis", false, "write symbol ABI information to output file, don't assemble")
 )
 
 var (
index a94a43fd66459359b2dab1d24dea60b1d9c63f4d..8d7b14d17c65020c8fcbafd56b38e2abf6244e9b 100644 (file)
@@ -804,7 +804,7 @@ func runInstall(dir string, ch chan struct{}) {
        if len(sfiles) > 0 {
                symabis = pathf("%s/symabis", workdir)
                var wg sync.WaitGroup
-               asmabis := append(asmArgs[:len(asmArgs):len(asmArgs)], "-symabis", "-o", symabis)
+               asmabis := append(asmArgs[:len(asmArgs):len(asmArgs)], "-gensymabis", "-o", symabis)
                asmabis = append(asmabis, sfiles...)
                if err := ioutil.WriteFile(goasmh, nil, 0666); err != nil {
                        fatalf("cannot write empty go_asm.h: %s", err)
index 89ef2da8cb59f3244891c0571a982d4585284ab4..a14a970ffbd3c337c63edf3aa4c55b1d75a15a5e 100644 (file)
@@ -265,7 +265,7 @@ func (gcToolchain) asm(b *Builder, a *Action, sfiles []string) ([]string, error)
 func (gcToolchain) symabis(b *Builder, a *Action, sfiles []string) (string, error) {
        mkSymabis := func(p *load.Package, sfiles []string, path string) error {
                args := asmArgs(a, p)
-               args = append(args, "-symabis", "-o", path)
+               args = append(args, "-gensymabis", "-o", path)
                for _, sfile := range sfiles {
                        if p.ImportPath == "runtime/cgo" && strings.HasPrefix(sfile, "gcc_") {
                                continue
@@ -274,7 +274,7 @@ func (gcToolchain) symabis(b *Builder, a *Action, sfiles []string) (string, erro
                }
 
                // Supply an empty go_asm.h as if the compiler had been run.
-               // -symabis parsing is lax enough that we don't need the
+               // -gensymabis parsing is lax enough that we don't need the
                // actual definitions that would appear in go_asm.h.
                if err := b.writeFile(a.Objdir+"go_asm.h", nil); err != nil {
                        return err
index 3a9e267940f250e07539fe0dff36dff06869c921..39647d7252d15f54eb0b395c71fc8ab78c8b3512 100644 (file)
@@ -813,7 +813,7 @@ func (t *test) run() {
                                t.err = fmt.Errorf("write empty go_asm.h: %s", err)
                                return
                        }
-                       cmd := []string{goTool(), "tool", "asm", "-symabis", "-o", "symabis"}
+                       cmd := []string{goTool(), "tool", "asm", "-gensymabis", "-o", "symabis"}
                        cmd = append(cmd, asms...)
                        _, err = runcmd(cmd...)
                        if err != nil {