]> Cypherpunks repositories - gostls13.git/commit
go/build: add GO$GOARCH-based ToolTags
authorRuss Cox <rsc@golang.org>
Thu, 4 Aug 2022 20:44:29 +0000 (16:44 -0400)
committerGopher Robot <gobot@golang.org>
Mon, 8 Aug 2022 14:39:20 +0000 (14:39 +0000)
commitfefac44a62fe0cfda73ab4abf15bf35b58faa6ac
treea32bde0c95d30fa0ba7605590a13c99dac2471d2
parent0063b9b036f1bdf5c548530a4f93e0b4a111ae14
go/build: add GO$GOARCH-based ToolTags

Implement proposal #45454, providing build tags based on the
sub-architecture information in the GO$GOARCH variable
(for example, GOARM for GOARCH=arm).

For example, when GOAMD64=v2, the additional build tags
amd64.v1 and amd64.v2 are defined to be true.

Fixes #45454.

Change-Id: I7be56060d47fc61843b97fd8a78498e8202c1ee7
Reviewed-on: https://go-review.googlesource.com/c/go/+/421434
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/go/internal/cfg/cfg.go
src/cmd/go/testdata/script/tooltags.txt [new file with mode: 0644]
src/go/build/build.go
src/internal/buildcfg/cfg.go