mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +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
1 changed files with 4 additions and 1 deletions
|
|
@ -1105,7 +1105,10 @@ func (ctxt *Link) hostlink() {
|
||||||
switch ctxt.BuildMode {
|
switch ctxt.BuildMode {
|
||||||
case BuildModeExe:
|
case BuildModeExe:
|
||||||
if ctxt.HeadType == objabi.Hdarwin {
|
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:
|
case BuildModePIE:
|
||||||
// ELF.
|
// ELF.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue