go/src/cmd/link/internal
Cherry Zhang eb330020dc cmd/dist, cmd/go: pass -arch for C compilation on Darwin
On Apple Silicon Mac, the C compiler has an annoying default
target selection, depending on the ancestor processes'
architecture. In particular, if the shell or IDE is x86, when
running "go build" even with a native ARM64 Go toolchain, the C
compiler defaults to x86, causing build failures. We pass "-arch"
flag explicitly to avoid this situation.

Fixes #43692.
Fixes #43476.
Updates golang/vscode-go#1087.

Change-Id: I80b6a116a114e11e273c6886e377a1cc969fa3f6
Reviewed-on: https://go-review.googlesource.com/c/go/+/283812
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2021-01-14 21:55:29 +00:00
..
amd64 cmd/link/internal/amd64: always generate R_X86_64_PLT32 for SDYNIMPORT calls 2020-12-01 05:09:44 +00:00
arm cmd/link: remove all constants of elf 2020-10-28 01:18:38 +00:00
arm64 cmd/link: fix typo in asm.go 2021-01-07 17:49:47 +00:00
benchmark all: add empty line between copyright header and package clause 2020-08-17 09:45:44 +00:00
ld cmd/dist, cmd/go: pass -arch for C compilation on Darwin 2021-01-14 21:55:29 +00:00
loadelf cmd/link/internal/loadelf: support additional ELF relocations on mips64 2020-12-11 08:18:17 +00:00
loader cmd/link: report error if builtin referenced but not defined 2020-11-05 22:14:40 +00:00
loadmacho cmd/link: use internal linking for -race mode on darwin/arm64 2020-11-02 23:58:08 +00:00
loadpe cmd/link: handle grouped resource sections 2020-12-22 20:00:00 +00:00
loadxcoff [dev.link] cmd/link: use new-style Reloc accessors in loadxcoff 2020-04-10 17:30:19 +00:00
mips [dev.link] cmd/link: remove "2", another round 2020-07-30 16:37:23 +00:00
mips64 cmd/link: add support for openbsd/mips64 2020-10-03 14:20:51 +00:00
ppc64 cmd/link: remove all constants of elf 2020-10-28 01:18:38 +00:00
riscv64 cmd/link,cmd/internal/obj/riscv: add TLS support for linux/riscv64 2020-10-27 04:20:42 +00:00
s390x cmd/link: remove all constants of elf 2020-10-28 01:18:38 +00:00
sym [dev.link] all: merge branch 'master' into dev.link 2020-09-11 12:07:44 -04:00
wasm cmd/link: consider interface conversions only in reachable code 2020-09-28 21:30:01 +00:00
x86 cmd/link: remove all constants of elf 2020-10-28 01:18:38 +00:00