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:
parent
670bbb0417
commit
1000bfecbe
|
@ -5,6 +5,8 @@ from kiwixbuild.utils import pj, xrun_find
|
||||||
from .base import PlatformInfo, MetaPlatformInfo, MixedMixin
|
from .base import PlatformInfo, MetaPlatformInfo, MixedMixin
|
||||||
|
|
||||||
|
|
||||||
|
MIN_MACOS_VERSION = '12.0'
|
||||||
|
|
||||||
class ApplePlatformInfo(PlatformInfo):
|
class ApplePlatformInfo(PlatformInfo):
|
||||||
build = 'iOS'
|
build = 'iOS'
|
||||||
static = True
|
static = True
|
||||||
|
@ -144,7 +146,7 @@ class macOSArm64(ApplePlatformInfo):
|
||||||
target = 'arm64-apple-macos'
|
target = 'arm64-apple-macos'
|
||||||
sdk_name = 'macosx'
|
sdk_name = 'macosx'
|
||||||
min_iphoneos_version = None
|
min_iphoneos_version = None
|
||||||
min_macos_version = '12.0'
|
min_macos_version = MIN_MACOS_VERSION
|
||||||
|
|
||||||
|
|
||||||
class macOSArm64Mixed(MixedMixin('macOS_arm64_static'), ApplePlatformInfo):
|
class macOSArm64Mixed(MixedMixin('macOS_arm64_static'), ApplePlatformInfo):
|
||||||
|
@ -154,7 +156,7 @@ class macOSArm64Mixed(MixedMixin('macOS_arm64_static'), ApplePlatformInfo):
|
||||||
target = 'arm64-apple-macos'
|
target = 'arm64-apple-macos'
|
||||||
sdk_name = 'macosx'
|
sdk_name = 'macosx'
|
||||||
min_iphoneos_version = None
|
min_iphoneos_version = None
|
||||||
min_macos_version = '12.0'
|
min_macos_version = MIN_MACOS_VERSION
|
||||||
|
|
||||||
|
|
||||||
class macOSx64(ApplePlatformInfo):
|
class macOSx64(ApplePlatformInfo):
|
||||||
|
@ -164,7 +166,7 @@ class macOSx64(ApplePlatformInfo):
|
||||||
target = 'x86_64-apple-macos'
|
target = 'x86_64-apple-macos'
|
||||||
sdk_name = 'macosx'
|
sdk_name = 'macosx'
|
||||||
min_iphoneos_version = None
|
min_iphoneos_version = None
|
||||||
min_macos_version = '12.0'
|
min_macos_version = MIN_MACOS_VERSION
|
||||||
|
|
||||||
|
|
||||||
class IOS(MetaPlatformInfo):
|
class IOS(MetaPlatformInfo):
|
||||||
|
|
|
@ -2,7 +2,7 @@ from .base import PlatformInfo, MixedMixin
|
||||||
|
|
||||||
from kiwixbuild.utils import pj
|
from kiwixbuild.utils import pj
|
||||||
from kiwixbuild._global import option, neutralEnv
|
from kiwixbuild._global import option, neutralEnv
|
||||||
|
from kiwixbuild.platforms.ios import MIN_MACOS_VERSION
|
||||||
|
|
||||||
class NativePlatformInfo(PlatformInfo):
|
class NativePlatformInfo(PlatformInfo):
|
||||||
build = 'native'
|
build = 'native'
|
||||||
|
@ -11,6 +11,8 @@ class NativePlatformInfo(PlatformInfo):
|
||||||
env = super().get_env()
|
env = super().get_env()
|
||||||
if neutralEnv('distname') == 'fedora':
|
if neutralEnv('distname') == 'fedora':
|
||||||
env['QT_SELECT'] = "5-64"
|
env['QT_SELECT'] = "5-64"
|
||||||
|
if neutralEnv('distname') == 'Darwin':
|
||||||
|
env['CFLAGS'] += ' '.join([env['CFLAGS'], f'-mmacosx-version-min={MIN_MACOS_VERSION}'])
|
||||||
return env
|
return env
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue