diff --git a/BUILD.gn b/BUILD.gn index 5925bc04b..49083cd6e 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -2143,13 +2143,18 @@ if (is_mac) { libs = [ "comctl32.lib", "d3d11.lib", - "glu32.lib", "imm32.lib", "oleacc.lib", - "opengl32.lib", "rpcrt4.lib", "shlwapi.lib", ] + + if (target_cpu != "arm64") { + libs += [ + "opengl32.lib", + "glu32.lib" + ] + } } if (is_linux) { diff --git a/include/base/cef_atomicops.h b/include/base/cef_atomicops.h index 2972a3bac..a5b645920 100644 --- a/include/base/cef_atomicops.h +++ b/include/base/cef_atomicops.h @@ -178,7 +178,7 @@ Atomic64 Release_Load(volatile const Atomic64* ptr); // Include our platform specific implementation. #if defined(OS_WIN) && defined(COMPILER_MSVC) && defined(ARCH_CPU_X86_FAMILY) #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" #elif defined(OS_MACOSX) #include "include/base/internal/cef_atomicops_mac.h" diff --git a/include/base/cef_build.h b/include/base/cef_build.h index 5f3a8639c..61dc31779 100644 --- a/include/base/cef_build.h +++ b/include/base/cef_build.h @@ -95,7 +95,7 @@ #define ARCH_CPU_ARMEL 1 #define ARCH_CPU_32_BITS 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_ARM64 1 #define ARCH_CPU_64_BITS 1 diff --git a/tools/make_distrib.py b/tools/make_distrib.py index ed9f990f8..2078d8218 100644 --- a/tools/make_distrib.py +++ b/tools/make_distrib.py @@ -556,8 +556,12 @@ if options.x64build + options.armbuild + options.arm64build > 1: print_error('Invalid combination of build options.') sys.exit() -if (options.armbuild or options.arm64build) and platform != 'linux': - print_error('--arm-build and --arm64-build are only supported on Linux.') +if options.armbuild and platform != '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() if options.sandbox and not platform in ('macosx', 'windows'): diff --git a/tools/msvs_env.bat b/tools/msvs_env.bat index f331299eb..ac44e2935 100644 --- a/tools/msvs_env.bat +++ b/tools/msvs_env.bat @@ -13,11 +13,13 @@ setlocal enabledelayedexpansion :: Require that platform is passed as the first argument. if "%1" == "win32" ( - set bits=32 + set vcvarsbat=vcvars32.bat ) else if "%1" == "win64" ( - set bits=64 + set vcvarsbat=vcvars64.bat +) else if "%1" == "winarm64" ( + set vcvarsbat=vcvarsamd64_arm64.bat ) 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 goto end ) @@ -30,7 +32,7 @@ if exist %vcvars% goto found_vcvars :: Search for the default VS2017 installation path. for %%x in ("%PROGRAMFILES(X86)%" "%PROGRAMFILES%") 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 ) )