mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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>
This commit is contained in:
parent
a4f3ff2205
commit
b2a032add8
1 changed files with 5 additions and 3 deletions
|
|
@ -468,9 +468,12 @@ func (ctxt *Link) domacho() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if machoPlatform == 0 {
|
if machoPlatform == 0 {
|
||||||
|
machoPlatform = PLATFORM_MACOS
|
||||||
|
if buildcfg.GOOS == "ios" {
|
||||||
|
machoPlatform = PLATFORM_IOS
|
||||||
|
}
|
||||||
switch ctxt.Arch.Family {
|
switch ctxt.Arch.Family {
|
||||||
default:
|
default:
|
||||||
machoPlatform = PLATFORM_MACOS
|
|
||||||
if ctxt.LinkMode == LinkInternal {
|
if ctxt.LinkMode == LinkInternal {
|
||||||
// For lldb, must say LC_VERSION_MIN_MACOSX or else
|
// For lldb, must say LC_VERSION_MIN_MACOSX or else
|
||||||
// it won't know that this Mach-O binary is from OS X
|
// 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[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
|
ml.data[1] = 10<<16 | 9<<8 | 0<<0 // SDK 10.9.0
|
||||||
}
|
}
|
||||||
case sys.ARM, sys.ARM64:
|
case sys.ARM64:
|
||||||
machoPlatform = PLATFORM_IOS
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue