diff options
| author | Ian Lance Taylor <iant@golang.org> | 2023-01-28 20:05:53 -0800 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-01-31 16:53:53 +0000 |
| commit | 43115ff094be30b7a3c45eaf82ee6d257f3aa6c6 (patch) | |
| tree | 9465ee671ee41ef4f6fe5dacacf3884b30cbde7b /src/cmd/link | |
| parent | 5c6d7322004330b58ea40ca9335dd9fb81f51f50 (diff) | |
| download | go-43115ff094be30b7a3c45eaf82ee6d257f3aa6c6.tar.xz | |
cmd/link, cmd/dist, internal/platform: consolidate c-archive support
Make all the tests for whether -buildmode=c-archive is supported consistent.
Base this on the historical code, on whether cmd/compile supports -shared,
and whether cmd/link permits the mode.
Change-Id: Ib996546906f698ade4c32b8e6c705838e4ad4b90
Reviewed-on: https://go-review.googlesource.com/c/go/+/463984
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/cmd/link')
| -rw-r--r-- | src/cmd/link/internal/ld/config.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cmd/link/internal/ld/config.go b/src/cmd/link/internal/ld/config.go index 336cb33e3b..b1774f8fd2 100644 --- a/src/cmd/link/internal/ld/config.go +++ b/src/cmd/link/internal/ld/config.go @@ -27,6 +27,8 @@ const ( BuildModePlugin ) +// Set implements flag.Value to set the build mode based on the argument +// to the -buildmode flag. func (mode *BuildMode) Set(s string) error { badmode := func() error { return fmt.Errorf("buildmode %s not supported on %s/%s", s, buildcfg.GOOS, buildcfg.GOARCH) |
