Mac: Add ARM64 configuration support (see issue #2981)

Requires Xcode 12.2 and the MacOS 11.0 SDK. To generate ARM64 builds set
the CEF_ENABLE_ARM64=1 environment variable and replace all usage of
--x64-build with --arm64-build in script command-line arguments.
This commit is contained in:
Marshall Greenblatt
2020-11-20 16:00:56 -05:00
parent a584bd187b
commit 71179da2f6
8 changed files with 42 additions and 25 deletions

View File

@ -327,11 +327,11 @@ def ValidateArgs(args):
windows_sdk_path = GetArgValue(args, 'windows_sdk_path')
# Target CPU architecture.
# - Windows supports "x86" and "x64".
# - Mac supports only "x64".
# - Windows supports "x86", "x64" and "arm64".
# - Mac supports "x64" and "arm64".
# - Linux supports only "x64" unless using a sysroot environment.
if platform == 'mac':
assert target_cpu == 'x64', 'target_cpu must be "x64"'
assert target_cpu in ('x64', 'arm64'), 'target_cpu must be "x64" or "arm64"'
elif platform == 'windows':
assert target_cpu in ('x86', 'x64',
'arm64'), 'target_cpu must be "x86", "x64" or "arm64"'
@ -548,6 +548,8 @@ def GetAllPlatformConfigs(build_args):
supported_cpus.append('arm64')
elif platform == 'mac':
supported_cpus = ['x64']
if os.environ.get('CEF_ENABLE_ARM64', '') == '1':
supported_cpus.append('arm64')
else:
raise Exception('Unsupported platform')