mirror of
https://github.com/golang/go.git
synced 2025-05-27 18:31:35 +00:00
cmd/link/internal/ld: modify -pagezero_size to please iTunes Connect validation for iOS.
This change modifies go to create iOS arm64 binaries that pass iTunes upload validation. Tested with xcode 9.0.1 macOS 10.13. Fixes #22402. Change-Id: I3f14c6ac85065e2da88d06edc8682947f6f1cd47 Reviewed-on: https://go-review.googlesource.com/72730 Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
parent
2fd9549797
commit
89a7adf8e4
@ -1105,7 +1105,10 @@ func (ctxt *Link) hostlink() {
|
||||
switch ctxt.BuildMode {
|
||||
case BuildModeExe:
|
||||
if ctxt.HeadType == objabi.Hdarwin {
|
||||
argv = append(argv, "-Wl,-pagezero_size,4000000")
|
||||
// __PAGEZERO segment size determined empirically.
|
||||
// XCode 9.0.1 successfully uploads an iOS app with this value.
|
||||
// Also works for macOS apps.
|
||||
argv = append(argv, "-Wl,-pagezero_size,100000000")
|
||||
}
|
||||
case BuildModePIE:
|
||||
// ELF.
|
||||
|
Loading…
x
Reference in New Issue
Block a user