mirror of
https://github.com/golang/go
synced 2024-11-26 10:48:22 -07:00
cmd/link/internal/ld: omit deprecated linker argument for iOS builds
After CL 151139 introduced a plugin test, the macOS linker for iOS outputs: ld: warning: -flat_namespace is deprecated on iOS Omit the -flat_namespace flag on iOS; plugins are not supported on iOS, and unlikely to ever be. Change-Id: I2d08f8b984efcfd442d572b4a0f3a2c95c551b9f Reviewed-on: https://go-review.googlesource.com/c/151300 Run-TryBot: Elias Naur <elias.naur@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
22dbc96d8a
commit
cfac65bf2f
@ -1122,7 +1122,7 @@ func (ctxt *Link) hostlink() {
|
||||
switch ctxt.HeadType {
|
||||
case objabi.Hdarwin:
|
||||
argv = append(argv, "-Wl,-headerpad,1144")
|
||||
if ctxt.DynlinkingGo() {
|
||||
if ctxt.DynlinkingGo() && !ctxt.Arch.InFamily(sys.ARM, sys.ARM64) {
|
||||
argv = append(argv, "-Wl,-flat_namespace")
|
||||
}
|
||||
if ctxt.BuildMode == BuildModeExe && !ctxt.Arch.InFamily(sys.ARM64) {
|
||||
|
Loading…
Reference in New Issue
Block a user