Set `min_macos_version` also on native platform.

`-min_macos_version` define our minimum targeted macos version.
We need to set it even if we build native on macos.
This commit is contained in:
Matthieu Gautier 2023-11-10 11:47:31 +01:00 committed by renaud gaudin
parent 670bbb0417
commit 1000bfecbe
No known key found for this signature in database
GPG Key ID: 447475A4CFBA2E24
2 changed files with 8 additions and 4 deletions

View File

@ -5,6 +5,8 @@ from kiwixbuild.utils import pj, xrun_find
from .base import PlatformInfo, MetaPlatformInfo, MixedMixin
MIN_MACOS_VERSION = '12.0'
class ApplePlatformInfo(PlatformInfo):
build = 'iOS'
static = True
@ -144,7 +146,7 @@ class macOSArm64(ApplePlatformInfo):
target = 'arm64-apple-macos'
sdk_name = 'macosx'
min_iphoneos_version = None
min_macos_version = '12.0'
min_macos_version = MIN_MACOS_VERSION
class macOSArm64Mixed(MixedMixin('macOS_arm64_static'), ApplePlatformInfo):
@ -154,7 +156,7 @@ class macOSArm64Mixed(MixedMixin('macOS_arm64_static'), ApplePlatformInfo):
target = 'arm64-apple-macos'
sdk_name = 'macosx'
min_iphoneos_version = None
min_macos_version = '12.0'
min_macos_version = MIN_MACOS_VERSION
class macOSx64(ApplePlatformInfo):
@ -164,7 +166,7 @@ class macOSx64(ApplePlatformInfo):
target = 'x86_64-apple-macos'
sdk_name = 'macosx'
min_iphoneos_version = None
min_macos_version = '12.0'
min_macos_version = MIN_MACOS_VERSION
class IOS(MetaPlatformInfo):

View File

@ -2,7 +2,7 @@ from .base import PlatformInfo, MixedMixin
from kiwixbuild.utils import pj
from kiwixbuild._global import option, neutralEnv
from kiwixbuild.platforms.ios import MIN_MACOS_VERSION
class NativePlatformInfo(PlatformInfo):
build = 'native'
@ -11,6 +11,8 @@ class NativePlatformInfo(PlatformInfo):
env = super().get_env()
if neutralEnv('distname') == 'fedora':
env['QT_SELECT'] = "5-64"
if neutralEnv('distname') == 'Darwin':
env['CFLAGS'] += ' '.join([env['CFLAGS'], f'-mmacosx-version-min={MIN_MACOS_VERSION}'])
return env