Skip to content

Commit ca308fd

Browse files
committed
Minor tweaks to "bashbrew-arch-to-goenv.sh" comments
1 parent 2ff9004 commit ca308fd

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

scripts/bashbrew-arch-to-goenv.sh

+9-4
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
set -eu
33

44
# usage: (from within another script)
5-
# eval "$(./.bashbrew-arch-to-goenv.sh)"
6-
# since we need those new environment variables in our other script
5+
# shell="$(./bashbrew-arch-to-goenv.sh arm32v6)"
6+
# eval "$shell"
7+
# since we need those new environment variables set in our other script
78

89
bashbrewArch="$1"; shift # "amd64", "arm32v5", "windows-amd64", etc.
910

@@ -20,8 +21,10 @@ case "$arch" in
2021

2122
arm64v*)
2223
printf 'export GOARCH="%s"\n' 'arm64'
23-
# no GOARM for arm64 (yet?) -- https://github.com/golang/go/blob/1e72bf62183ea21b9affffd4450d44d994393899/src/cmd/internal/objabi/util.go#L40
24-
#printf 'export GOARM="%s"\n' "${arch#arm64v}"
24+
# no GOARM(64) for arm64 (yet?):
25+
# https://github.com/golang/go/blob/be0e0b06ac53d3d02ea83b479790404057b6f19b/src/internal/buildcfg/cfg.go#L86
26+
# https://github.com/golang/go/issues/60905
27+
#printf 'export GOARM64="v%s"\n' "${arch#arm64v}"
2528
printf 'unset GOARM\n'
2629
;;
2730

@@ -30,6 +33,8 @@ case "$arch" in
3033
printf 'unset GOARM\n'
3134
;;
3235

36+
# TODO GOAMD64: https://github.com/golang/go/blob/be0e0b06ac53d3d02ea83b479790404057b6f19b/src/internal/buildcfg/cfg.go#L57-L70 (v1 implied)
37+
3338
*)
3439
printf 'export GOARCH="%s"\n' "$arch"
3540
printf 'unset GOARM\n'

0 commit comments

Comments
 (0)