diff options
| author | Russ Cox <rsc@golang.org> | 2021-10-11 11:57:24 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2021-10-27 16:39:27 +0000 |
| commit | 4f73fd05a91a9b8ceced6b7f89d35f363c414ec8 (patch) | |
| tree | d9a6436610d2521cce7ac703b470b076ae26ced2 /src/cmd/link | |
| parent | cfb532158fc5b5cd6b9c35bbc2ff7c203fe5f09b (diff) | |
| download | go-4f73fd05a91a9b8ceced6b7f89d35f363c414ec8.tar.xz | |
cmd: move internal/str back to cmd/go
cmd/go is not subject to all the same restrictions as most of cmd.
In particular it need not be buildable with the bootstrap toolchain.
So it is better to keep as little code shared between cmd/go and
cmd/compile, cmd/link, cmd/cgo as possible.
cmd/internal/str started as cmd/go/internal/str but was moved
to cmd/internal in order to make use of the quoted string code.
Move that code to cmd/internal/quoted and then move the rest of
cmd/internal/str back to cmd/go/internal/str.
Change-Id: I3a98f754d545cc3af7e9a32c2b77a5a035ea7b9a
Reviewed-on: https://go-review.googlesource.com/c/go/+/355010
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Diffstat (limited to 'src/cmd/link')
| -rw-r--r-- | src/cmd/link/dwarf_test.go | 4 | ||||
| -rw-r--r-- | src/cmd/link/internal/ld/main.go | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/cmd/link/dwarf_test.go b/src/cmd/link/dwarf_test.go index f7bbb014d9..78ef3cfe97 100644 --- a/src/cmd/link/dwarf_test.go +++ b/src/cmd/link/dwarf_test.go @@ -8,7 +8,7 @@ import ( "bytes" cmddwarf "cmd/internal/dwarf" "cmd/internal/objfile" - "cmd/internal/str" + "cmd/internal/quoted" "debug/dwarf" "internal/testenv" "os" @@ -68,7 +68,7 @@ func testDWARF(t *testing.T, buildmode string, expectDWARF bool, env ...string) if extld == "" { extld = "gcc" } - extldArgs, err := str.SplitQuotedFields(extld) + extldArgs, err := quoted.Split(extld) if err != nil { t.Fatal(err) } diff --git a/src/cmd/link/internal/ld/main.go b/src/cmd/link/internal/ld/main.go index a5a5a71250..a1d86965e4 100644 --- a/src/cmd/link/internal/ld/main.go +++ b/src/cmd/link/internal/ld/main.go @@ -34,7 +34,7 @@ import ( "bufio" "cmd/internal/goobj" "cmd/internal/objabi" - "cmd/internal/str" + "cmd/internal/quoted" "cmd/internal/sys" "cmd/link/internal/benchmark" "flag" @@ -76,8 +76,8 @@ var ( flagLibGCC = flag.String("libgcc", "", "compiler support lib for internal linking; use \"none\" to disable") flagTmpdir = flag.String("tmpdir", "", "use `directory` for temporary files") - flagExtld str.QuotedStringListFlag - flagExtldflags str.QuotedStringListFlag + flagExtld quoted.Flag + flagExtldflags quoted.Flag flagExtar = flag.String("extar", "", "archive program for buildmode=c-archive") flagA = flag.Bool("a", false, "no-op (deprecated)") |
