]> Cypherpunks repositories - gostls13.git/commit
cmd/link: pass darwin/amd64-specific flags only on AMD64
authorCherry Zhang <cherryyz@google.com>
Thu, 3 Sep 2020 01:04:12 +0000 (21:04 -0400)
committerCherry Zhang <cherryyz@google.com>
Thu, 3 Sep 2020 21:50:25 +0000 (21:50 +0000)
commit612b1194475a23760ec502b48a93fea7237f3ae6
tree3733a3936cc40dd231ebae6f2f756b0d0f6e66e1
parente61d17d3b9ccf4c3e8ac87add9d74da7afa76488
cmd/link: pass darwin/amd64-specific flags only on AMD64

The linker assumed macOS is AMD64 (and 386 in the past). It
passes darwin/amd64-specific flags to the external linker when
building for macOS. They don't work for ARM64-based macOS. So
only pass them on AMD64.

Disable DWARF combining for macOS ARM64 for now. The generated
binary doesn't run. (TODO: fix.)

For macOS ARM64 port. External linking now works.

Change-Id: Iab53bc48f4fadd9b91de8898b4b450ea442667a2
Reviewed-on: https://go-review.googlesource.com/c/go/+/253019
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/link/internal/ld/lib.go