Skip to content

Commit

Permalink
[boost-regex] Enable arm64-windows (microsoft#6206)
Browse files Browse the repository at this point in the history
  • Loading branch information
tony979 authored and grdowns committed Apr 29, 2019
1 parent 55a4b18 commit e7663f3
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ports/boost-build/CONTROL
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Source: boost-build
Version: 1.69.0
Version: 1.69.0-1
Description: Boost.Build
63 changes: 63 additions & 0 deletions ports/boost-build/arm64msvc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
diff --git a/src/tools/msvc.jam b/src/tools/msvc.jam
index e6c0b60..62c3a41 100644
--- a/src/tools/msvc.jam
+++ b/src/tools/msvc.jam
@@ -466,6 +466,7 @@ rule configure-version-specific ( toolset : version : conditions )
toolset.flags $(toolset).link LINKFLAGS $(conditions)/$(.cpu-arch-i386) : "/MACHINE:X86" ;
toolset.flags $(toolset).link LINKFLAGS $(conditions)/$(.cpu-arch-ia64) : "/MACHINE:IA64" ;
toolset.flags $(toolset).link LINKFLAGS $(conditions)/$(.cpu-arch-arm) : "/MACHINE:ARM" ;
+ toolset.flags $(toolset).link LINKFLAGS $(conditions)/$(.cpu-arch-arm64) : "/MACHINE:ARM64" ;

# Make sure that manifest will be generated even if there is no
# dependencies to put there.
@@ -1256,7 +1257,7 @@ local rule configure-really ( version ? : options * )
local below-8.0 = [ MATCH "^([67]\\.)" : $(version) ] ;
local below-11.0 = [ MATCH "^([6789]\\.|10\\.)" : $(version) ] ;

- local cpu = i386 amd64 ia64 arm ;
+ local cpu = i386 amd64 ia64 arm arm64 ;
if $(below-8.0)
{
cpu = i386 ;
@@ -1270,6 +1271,7 @@ local rule configure-really ( version ? : options * )
local setup-i386 ;
local setup-ia64 ;
local setup-arm ;
+ local setup-arm64 ;
local setup-phone-i386 ;
local setup-phone-arm ;

@@ -1327,6 +1329,7 @@ local rule configure-really ( version ? : options * )
local default-setup-i386 = vcvars32.bat ;
local default-setup-ia64 = vcvarsx86_ia64.bat ;
local default-setup-arm = vcvarsx86_arm.bat ;
+ local default-setup-arm64 = vcvarsx86_arm64.bat ;
local default-setup-phone-i386 = vcvarsphonex86.bat ;
local default-setup-phone-arm = vcvarsphonex86_arm.bat ;

@@ -1338,6 +1341,7 @@ local rule configure-really ( version ? : options * )
local default-global-setup-options-i386 = x86 ;
local default-global-setup-options-ia64 = x86_ia64 ;
local default-global-setup-options-arm = x86_arm ;
+ local default-global-setup-options-arm64 = x86_arm64 ;

# When using 64-bit Windows, and targeting 64-bit, it is possible to
# use a native 64-bit compiler, selected by the "amd64" & "ia64"
@@ -1418,6 +1422,7 @@ local rule configure-really ( version ? : options * )
local default-assembler-i386 = "ml -coff" ;
local default-assembler-ia64 = ias ;
local default-assembler-ia64 = armasm ;
+ local default-assembler-arm64 = armasm64 ;

assembler = [ feature.get-values <assembler> : $(options) ] ;

@@ -1932,6 +1937,9 @@ if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
<architecture>arm/<address-model>
<architecture>arm/<address-model>32 ;

+.cpu-arch-arm64 =
+ <architecture>arm/<address-model>
+ <architecture>arm/<address-model>64 ;

# Supported CPU types (only Itanium optimization options are supported from
# VC++ 2005 on). See
3 changes: 3 additions & 0 deletions ports/boost-build/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ vcpkg_from_github(
REF boost-1.69.0
SHA512 e8d89e75c83a08bab29f52b5100fccf1d2ddf492a532ae4cb8121a5f49819aebb8157d1a1fd7d514bd8a0fe444e5ebb1103b10c8579d5c234ab81110d9c334a8
HEAD_REF master
PATCHES
# Add the support of arm64-windows
arm64msvc.patch
)

vcpkg_download_distfile(ARCHIVE
Expand Down
2 changes: 1 addition & 1 deletion ports/boost-modular-build-helper/CONTROL
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Source: boost-modular-build-helper
Version: 2019-01-25
Version: 2019-04-25
2 changes: 2 additions & 0 deletions ports/boost-modular-build-helper/boost-modular-build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ function(boost_modular_build)
list(APPEND _bm_OPTIONS address-model=64 architecture=x86)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
list(APPEND _bm_OPTIONS address-model=32 architecture=arm)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
list(APPEND _bm_OPTIONS address-model=64 architecture=arm)
else()
list(APPEND _bm_OPTIONS address-model=32 architecture=x86)
endif()
Expand Down

0 comments on commit e7663f3

Please sign in to comment.