Fix min iOS SDK overridden globally

Some targets enforce iOS 13.0 as minimum SDK, whereas current
script was overriding IOS_MIN_SDK_VERSION at a global scope.

Override min SDK 13.0 in those targets specifically.

See 1cf972d36f

Fixes #30
This commit is contained in:
Davide De Rosa 2020-11-19 17:17:08 +01:00
parent c1ce10a4f0
commit b436a24d22
2 changed files with 3 additions and 6 deletions

View File

@ -69,7 +69,7 @@ my %targets = ();
# Simulator (arm64) # Simulator (arm64)
"ios-sim-cross-arm64" => { "ios-sim-cross-arm64" => {
inherit_from => [ "darwin64-arm64-cc", "ios-cross-base" ], inherit_from => [ "darwin64-arm64-cc", "ios-cross-base" ],
cflags => add("-target arm64-apple-ios13.0-simulator"), cflags => add("-target arm64-apple-ios13.0-simulator -mios-version-min=13.0"),
sys_id => "iOS", sys_id => "iOS",
}, },
@ -98,13 +98,13 @@ my %targets = ();
# Catalyst (x86_64) # Catalyst (x86_64)
"mac-catalyst-x86_64" => { "mac-catalyst-x86_64" => {
inherit_from => [ "darwin64-x86_64-cc", "mac-catalyst-base" ], inherit_from => [ "darwin64-x86_64-cc", "mac-catalyst-base" ],
cflags => add("-target x86_64-apple-ios13.0-macabi"), cflags => add("-target x86_64-apple-ios13.0-macabi -mios-version-min=13.0"),
sys_id => "MacOSX", sys_id => "MacOSX",
}, },
# Catalyst (arm64) # Catalyst (arm64)
"mac-catalyst-arm64" => { "mac-catalyst-arm64" => {
inherit_from => [ "darwin64-arm64-cc", "mac-catalyst-base" ], inherit_from => [ "darwin64-arm64-cc", "mac-catalyst-base" ],
cflags => add("-target arm64-apple-ios13.0-macabi "), cflags => add("-target arm64-apple-ios13.0-macabi -mios-version-min=13.0"),
sys_id => "MacOSX", sys_id => "MacOSX",
}, },

View File

@ -61,9 +61,6 @@ do
PLATFORM="AppleTVOS" PLATFORM="AppleTVOS"
elif [[ "${TARGET}" == "ios-sim-cross-"* ]]; then elif [[ "${TARGET}" == "ios-sim-cross-"* ]]; then
PLATFORM="iPhoneSimulator" PLATFORM="iPhoneSimulator"
if [[ "${TARGET}" == "ios-sim-cross-arm64" ]]; then
IOS_MIN_SDK_VERSION="13.0"
fi
else else
PLATFORM="iPhoneOS" PLATFORM="iPhoneOS"
fi fi