aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2021-04-21 19:02:11 -0400
committerCherry Zhang <cherryyz@google.com>2021-04-22 14:34:36 +0000
commitb2a032add8e46ca03af0b2c1c72052b75e056101 (patch)
treeba6c04093625b45ef91142a3b01b939372ebfd4a /src
parenta4f3ff22056646a563fbde663ff56fce33b7773f (diff)
downloadgo-b2a032add8e46ca03af0b2c1c72052b75e056101.tar.xz
cmd/link: update machoPlatform selection
Now that we have darwin/arm64 and ios/arm64 ports, make it based on GOOS, instead of GOARCH. Also drop a remaining case of 32-bit ARM. Change-Id: I954fff980712fd3b81b561ddcb6f3a4ef73fa0b9 Reviewed-on: https://go-review.googlesource.com/c/go/+/312549 Trust: Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com> Reviewed-by: Than McIntosh <thanm@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/cmd/link/internal/ld/macho.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/cmd/link/internal/ld/macho.go b/src/cmd/link/internal/ld/macho.go
index 98c9a32f4d..1c88c05dd4 100644
--- a/src/cmd/link/internal/ld/macho.go
+++ b/src/cmd/link/internal/ld/macho.go
@@ -468,9 +468,12 @@ func (ctxt *Link) domacho() {
}
}
if machoPlatform == 0 {
+ machoPlatform = PLATFORM_MACOS
+ if buildcfg.GOOS == "ios" {
+ machoPlatform = PLATFORM_IOS
+ }
switch ctxt.Arch.Family {
default:
- machoPlatform = PLATFORM_MACOS
if ctxt.LinkMode == LinkInternal {
// For lldb, must say LC_VERSION_MIN_MACOSX or else
// it won't know that this Mach-O binary is from OS X
@@ -486,8 +489,7 @@ func (ctxt *Link) domacho() {
ml.data[0] = 10<<16 | 9<<8 | 0<<0 // OS X version 10.9.0
ml.data[1] = 10<<16 | 9<<8 | 0<<0 // SDK 10.9.0
}
- case sys.ARM, sys.ARM64:
- machoPlatform = PLATFORM_IOS
+ case sys.ARM64:
}
}