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>
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) {