Windows: Add ARM64 binary distribution support (see issue #2773)

This commit is contained in:
Iain Apreotesei 2020-02-19 16:33:27 +00:00 committed by Marshall Greenblatt
parent 294eb75355
commit afcee77abe
5 changed files with 21 additions and 10 deletions

View File

@ -2143,13 +2143,18 @@ if (is_mac) {
libs = [ libs = [
"comctl32.lib", "comctl32.lib",
"d3d11.lib", "d3d11.lib",
"glu32.lib",
"imm32.lib", "imm32.lib",
"oleacc.lib", "oleacc.lib",
"opengl32.lib",
"rpcrt4.lib", "rpcrt4.lib",
"shlwapi.lib", "shlwapi.lib",
] ]
if (target_cpu != "arm64") {
libs += [
"opengl32.lib",
"glu32.lib"
]
}
} }
if (is_linux) { if (is_linux) {

View File

@ -178,7 +178,7 @@ Atomic64 Release_Load(volatile const Atomic64* ptr);
// Include our platform specific implementation. // Include our platform specific implementation.
#if defined(OS_WIN) && defined(COMPILER_MSVC) && defined(ARCH_CPU_X86_FAMILY) #if defined(OS_WIN) && defined(COMPILER_MSVC) && defined(ARCH_CPU_X86_FAMILY)
#include "include/base/internal/cef_atomicops_x86_msvc.h" #include "include/base/internal/cef_atomicops_x86_msvc.h"
#elif defined(OS_WIN) && defined(__ARM_ARCH_ISA_A64) #elif defined(OS_WIN) && (defined(__ARM_ARCH_ISA_A64) || defined(_M_ARM64))
#include "include/base/internal/cef_atomicops_arm64_msvc.h" #include "include/base/internal/cef_atomicops_arm64_msvc.h"
#elif defined(OS_MACOSX) #elif defined(OS_MACOSX)
#include "include/base/internal/cef_atomicops_mac.h" #include "include/base/internal/cef_atomicops_mac.h"

View File

@ -95,7 +95,7 @@
#define ARCH_CPU_ARMEL 1 #define ARCH_CPU_ARMEL 1
#define ARCH_CPU_32_BITS 1 #define ARCH_CPU_32_BITS 1
#define ARCH_CPU_LITTLE_ENDIAN 1 #define ARCH_CPU_LITTLE_ENDIAN 1
#elif defined(__aarch64__) #elif defined(__aarch64__) || defined(_M_ARM64)
#define ARCH_CPU_ARM_FAMILY 1 #define ARCH_CPU_ARM_FAMILY 1
#define ARCH_CPU_ARM64 1 #define ARCH_CPU_ARM64 1
#define ARCH_CPU_64_BITS 1 #define ARCH_CPU_64_BITS 1

View File

@ -556,8 +556,12 @@ if options.x64build + options.armbuild + options.arm64build > 1:
print_error('Invalid combination of build options.') print_error('Invalid combination of build options.')
sys.exit() sys.exit()
if (options.armbuild or options.arm64build) and platform != 'linux': if options.armbuild and platform != 'linux':
print_error('--arm-build and --arm64-build are only supported on Linux.') print_error('--arm-build is only supported on Linux.')
sys.exit()
if options.arm64build and not platform in ('linux', 'windows'):
print_error('--arm64-build is only supported on Linux and Windows.')
sys.exit() sys.exit()
if options.sandbox and not platform in ('macosx', 'windows'): if options.sandbox and not platform in ('macosx', 'windows'):

View File

@ -13,11 +13,13 @@ setlocal enabledelayedexpansion
:: Require that platform is passed as the first argument. :: Require that platform is passed as the first argument.
if "%1" == "win32" ( if "%1" == "win32" (
set bits=32 set vcvarsbat=vcvars32.bat
) else if "%1" == "win64" ( ) else if "%1" == "win64" (
set bits=64 set vcvarsbat=vcvars64.bat
) else if "%1" == "winarm64" (
set vcvarsbat=vcvarsamd64_arm64.bat
) else ( ) else (
echo ERROR: Please specify a target platform: win32 or win64 echo ERROR: Please specify a target platform: win32, win64 or winarm64
set ERRORLEVEL=1 set ERRORLEVEL=1
goto end goto end
) )
@ -30,7 +32,7 @@ if exist %vcvars% goto found_vcvars
:: Search for the default VS2017 installation path. :: Search for the default VS2017 installation path.
for %%x in ("%PROGRAMFILES(X86)%" "%PROGRAMFILES%") do ( for %%x in ("%PROGRAMFILES(X86)%" "%PROGRAMFILES%") do (
for %%y in (Professional Enterprise Community BuildTools) do ( for %%y in (Professional Enterprise Community BuildTools) do (
set vcvars="%%~x\Microsoft Visual Studio\2017\%%y\VC\Auxiliary\Build\vcvars%bits%.bat" set vcvars="%%~x\Microsoft Visual Studio\2017\%%y\VC\Auxiliary\Build\%vcvarsbat%"
if exist !vcvars! goto found_vcvars if exist !vcvars! goto found_vcvars
) )
) )