aedi: assert on unsupported os version

This commit is contained in:
alexey.lysiuk 2023-01-01 10:47:22 +02:00
parent 69aa725cb8
commit 4880b7bd15

View file

@ -111,12 +111,14 @@ class Builder(object):
if not arguments.disable_x64: if not arguments.disable_x64:
os_version = arguments.os_version_x64 if arguments.os_version_x64 else OS_VERSION_X86_64 os_version = arguments.os_version_x64 if arguments.os_version_x64 else OS_VERSION_X86_64
assert os_version >= OS_VERSION_X86_64, f'macOS {os_version} is not supported'
sdk_path = adjust_sdk_path(arguments.sdk_path_x64) sdk_path = adjust_sdk_path(arguments.sdk_path_x64)
platform = TargetPlatform('x86_64', 'x86_64-apple-darwin', os_version, sdk_path, state.prefix_path) platform = TargetPlatform('x86_64', 'x86_64-apple-darwin', os_version, sdk_path, state.prefix_path)
self._platforms.append(platform) self._platforms.append(platform)
if not arguments.disable_arm: if not arguments.disable_arm:
os_version = arguments.os_version_arm if arguments.os_version_arm else OS_VERSION_ARM64 os_version = arguments.os_version_arm if arguments.os_version_arm else OS_VERSION_ARM64
assert os_version >= OS_VERSION_ARM64, f'macOS {os_version} is not supported'
sdk_path = adjust_sdk_path(arguments.sdk_path_arm) sdk_path = adjust_sdk_path(arguments.sdk_path_arm)
platform = TargetPlatform('arm64', 'aarch64-apple-darwin', os_version, sdk_path, state.prefix_path) platform = TargetPlatform('arm64', 'aarch64-apple-darwin', os_version, sdk_path, state.prefix_path)
self._platforms.append(platform) self._platforms.append(platform)