From e6fb19275e32e95d12c806954f83cf945417bb08 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Fri, 19 Jan 2024 08:07:03 +0200 Subject: [PATCH] [iOS, 3.x] Update linker flags for Xcode 15.0 - 15.2. Bump min. iOS version to 12. --- .../godot_ios.xcodeproj/project.pbxproj | 18 ++++++++++++------ platform/iphone/detect.py | 16 +++++++++------- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj b/misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj index 02c6c947c0ba..ff11edbf3e82 100644 --- a/misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj +++ b/misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj @@ -250,8 +250,11 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - OTHER_LDFLAGS = "$linker_flags"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + "LD_CLASSIC_1500" = "-ld_classic"; + "LD_CLASSIC_1501" = "-ld_classic"; + "LD_CLASSIC_1510" = "-ld_classic"; + OTHER_LDFLAGS = "$(LD_CLASSIC_$(XCODE_VERSION_ACTUAL)) $linker_flags"; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "$targeted_device_family"; }; @@ -289,8 +292,11 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - OTHER_LDFLAGS = "$linker_flags"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + "LD_CLASSIC_1500" = "-ld_classic"; + "LD_CLASSIC_1501" = "-ld_classic"; + "LD_CLASSIC_1510" = "-ld_classic"; + OTHER_LDFLAGS = "$(LD_CLASSIC_$(XCODE_VERSION_ACTUAL)) $linker_flags"; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "$targeted_device_family"; VALIDATE_PRODUCT = YES; @@ -310,7 +316,7 @@ CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)"; DEVELOPMENT_TEAM = $team_id; INFOPLIST_FILE = "$binary/$binary-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -342,7 +348,7 @@ CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)"; DEVELOPMENT_TEAM = $team_id; INFOPLIST_FILE = "$binary/$binary-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/platform/iphone/detect.py b/platform/iphone/detect.py index 8be184a7c457..1b58dad819ee 100644 --- a/platform/iphone/detect.py +++ b/platform/iphone/detect.py @@ -116,15 +116,15 @@ def configure(env): if env["ios_simulator"]: detect_darwin_sdk_path("iphonesimulator", env) - env.Append(ASFLAGS=["-mios-simulator-version-min=10.0"]) - env.Append(CCFLAGS=["-mios-simulator-version-min=10.0"]) - env.Append(LINKFLAGS=["-mios-simulator-version-min=10.0"]) + env.Append(ASFLAGS=["-mios-simulator-version-min=12.0"]) + env.Append(CCFLAGS=["-mios-simulator-version-min=12.0"]) + env.Append(LINKFLAGS=["-mios-simulator-version-min=12.0"]) env.extra_suffix = ".simulator" + env.extra_suffix else: detect_darwin_sdk_path("iphone", env) - env.Append(ASFLAGS=["-miphoneos-version-min=10.0"]) - env.Append(CCFLAGS=["-miphoneos-version-min=10.0"]) - env.Append(LINKFLAGS=["-miphoneos-version-min=10.0"]) + env.Append(ASFLAGS=["-miphoneos-version-min=12.0"]) + env.Append(CCFLAGS=["-miphoneos-version-min=12.0"]) + env.Append(LINKFLAGS=["-miphoneos-version-min=12.0"]) if env["arch"] == "x86" or env["arch"] == "x86_64": if not env["ios_simulator"]: @@ -199,4 +199,6 @@ def configure(env): env["ENV"]["CODESIGN_ALLOCATE"] = "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate" env.Prepend(CPPPATH=["#platform/iphone"]) - env.Append(CPPDEFINES=["IPHONE_ENABLED", "UNIX_ENABLED", "GLES_ENABLED", "COREAUDIO_ENABLED"]) + env.Append( + CPPDEFINES=["IPHONE_ENABLED", "UNIX_ENABLED", "GLES_ENABLED", "COREAUDIO_ENABLED", "GLES_SILENCE_DEPRECATION"] + )