-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
go/build: add GO$GOARCH-based ToolTags
Implement proposal golang#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 golang#45454. Change-Id: I7be56060d47fc61843b97fd8a78498e8202c1ee7 Reviewed-on: https://go-review.googlesource.com/c/go/+/421434 TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Russ Cox <[email protected]> Reviewed-by: Cuong Manh Le <[email protected]> Auto-Submit: Russ Cox <[email protected]> Reviewed-by: Matthew Dempsky <[email protected]>
- Loading branch information
Showing
4 changed files
with
114 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
env GOARCH=amd64 | ||
env GOAMD64=v3 | ||
go list -f '{{context.ToolTags}}' | ||
stdout 'amd64.v1 amd64.v2 amd64.v3' | ||
|
||
env GOARCH=arm | ||
env GOARM=6 | ||
go list -f '{{context.ToolTags}}' | ||
stdout 'arm.5 arm.6' | ||
|
||
env GOARCH=mips | ||
env GOMIPS=hardfloat | ||
go list -f '{{context.ToolTags}}' | ||
stdout 'mips.hardfloat' | ||
|
||
env GOARCH=mips64 | ||
env GOMIPS=hardfloat | ||
go list -f '{{context.ToolTags}}' | ||
stdout 'mips64.hardfloat' | ||
|
||
env GOARCH=ppc64 | ||
env GOPPC64=power9 | ||
go list -f '{{context.ToolTags}}' | ||
stdout 'ppc64.power8 ppc64.power9' | ||
|
||
env GOARCH=ppc64le | ||
env GOPPC64=power9 | ||
go list -f '{{context.ToolTags}}' | ||
stdout 'ppc64le.power8 ppc64le.power9' | ||
|
||
env GOARCH=386 | ||
env GO386=sse2 | ||
go list -f '{{context.ToolTags}}' | ||
stdout '386.sse2' | ||
|
||
env GOARCH=wasm | ||
env GOWASM=satconv | ||
go list -f '{{context.ToolTags}}' | ||
stdout 'wasm.satconv' | ||
|
||
-- go.mod -- | ||
module m | ||
|
||
-- p.go -- | ||
package p |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters