Commit cfac65bf authored by Elias Naur's avatar Elias Naur

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: 's avatarIan Lance Taylor <iant@golang.org>
parent 22dbc96d
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment