mirror of
https://github.com/boostorg/context.git
synced 2026-01-19 04:02:17 +00:00
Add Windows ARM64 support
Currently we do not have fcontext related ASM files for Windows ARM64. So we can use winfib context-impl only for Windows ARM64. Fixes issue : https://github.com/boostorg/boost/issues/1070 Related to PR: https://github.com/boostorg/boost/pull/1077
This commit is contained in:
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -54,7 +54,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ windows-2022, windows-2025 ]
|
os: [ windows-2022, windows-2025, windows-11-arm ]
|
||||||
|
|
||||||
runs-on: ${{matrix.os}}
|
runs-on: ${{matrix.os}}
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import config : requires ;
|
|||||||
project
|
project
|
||||||
: common-requirements <library>$(boost_dependencies)
|
: common-requirements <library>$(boost_dependencies)
|
||||||
: requirements
|
: requirements
|
||||||
|
<target-os>windows,<architecture>arm,<address-model>64:<context-impl>winfib
|
||||||
<target-os>windows:<define>_WIN32_WINNT=0x0601
|
<target-os>windows:<define>_WIN32_WINNT=0x0601
|
||||||
<target-os>linux,<toolset>gcc,<segmented-stacks>on:<cxxflags>-fsplit-stack
|
<target-os>linux,<toolset>gcc,<segmented-stacks>on:<cxxflags>-fsplit-stack
|
||||||
<target-os>linux,<toolset>gcc,<segmented-stacks>on:<cxxflags>-DBOOST_USE_SEGMENTED_STACKS
|
<target-os>linux,<toolset>gcc,<segmented-stacks>on:<cxxflags>-DBOOST_USE_SEGMENTED_STACKS
|
||||||
@@ -189,15 +190,12 @@ alias asm_sources
|
|||||||
<toolset>gcc
|
<toolset>gcc
|
||||||
;
|
;
|
||||||
|
|
||||||
# ARM64/AAPCS/PE — also allow <abi>ms for Windows on ARM64 (MSVC)
|
# ARM64/AAPCS/PE
|
||||||
# <abi>ms only applies when
|
|
||||||
# <architecture>arm <address-model>64 <binary-format>pe,
|
|
||||||
# so x86/x64 MSVC builds are unaffected.
|
|
||||||
alias asm_sources
|
alias asm_sources
|
||||||
: asm/make_arm64_aapcs_pe_armasm.asm
|
: asm/make_arm64_aapcs_pe_armasm.asm
|
||||||
asm/jump_arm64_aapcs_pe_armasm.asm
|
asm/jump_arm64_aapcs_pe_armasm.asm
|
||||||
asm/ontop_arm64_aapcs_pe_armasm.asm
|
asm/ontop_arm64_aapcs_pe_armasm.asm
|
||||||
: <abi>aapcs,<abi>ms
|
: <abi>aapcs
|
||||||
<address-model>64
|
<address-model>64
|
||||||
<architecture>arm
|
<architecture>arm
|
||||||
<binary-format>pe
|
<binary-format>pe
|
||||||
|
|||||||
@@ -41,6 +41,10 @@ rule native-impl ( properties * )
|
|||||||
{
|
{
|
||||||
result = <build>no ;
|
result = <build>no ;
|
||||||
}
|
}
|
||||||
|
else if ( <target-os>windows in $(properties) && <architecture>arm in $(properties) && <address-model>64 in $(properties) )
|
||||||
|
{
|
||||||
|
return <context-impl>winfib ; # for windows arm64 always use winfib and skip ASM
|
||||||
|
}
|
||||||
else if ( ! ( <target-os>windows in $(properties) ) )
|
else if ( ! ( <target-os>windows in $(properties) ) )
|
||||||
{
|
{
|
||||||
result = <context-impl>ucontext ;
|
result = <context-impl>ucontext ;
|
||||||
@@ -52,6 +56,22 @@ rule native-impl ( properties * )
|
|||||||
return $(result) ;
|
return $(result) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rule fcontext-impl ( properties * )
|
||||||
|
{
|
||||||
|
# Skip on Windows ARM64
|
||||||
|
if ( <target-os>windows in $(properties) &&
|
||||||
|
<architecture>arm in $(properties) &&
|
||||||
|
<address-model>64 in $(properties) )
|
||||||
|
{
|
||||||
|
return <build>no ; # for windows arm64 always use winfib and skip fcontext
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return <context-impl>fcontext ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
obj is_libstdcxx : is_libstdcxx.cpp ;
|
obj is_libstdcxx : is_libstdcxx.cpp ;
|
||||||
explicit is_libstdcxx ;
|
explicit is_libstdcxx ;
|
||||||
|
|
||||||
@@ -95,7 +115,7 @@ test-suite minimal :
|
|||||||
|
|
||||||
[ run test_fiber.cpp :
|
[ run test_fiber.cpp :
|
||||||
: :
|
: :
|
||||||
<context-impl>fcontext
|
<conditional>@fcontext-impl
|
||||||
[ requires cxx11_auto_declarations
|
[ requires cxx11_auto_declarations
|
||||||
cxx11_constexpr
|
cxx11_constexpr
|
||||||
cxx11_defaulted_functions
|
cxx11_defaulted_functions
|
||||||
@@ -150,7 +170,7 @@ test-suite minimal :
|
|||||||
|
|
||||||
[ run test_callcc.cpp :
|
[ run test_callcc.cpp :
|
||||||
: :
|
: :
|
||||||
<context-impl>fcontext
|
<conditional>@fcontext-impl
|
||||||
[ requires cxx11_auto_declarations
|
[ requires cxx11_auto_declarations
|
||||||
cxx11_constexpr
|
cxx11_constexpr
|
||||||
cxx11_defaulted_functions
|
cxx11_defaulted_functions
|
||||||
|
|||||||
Reference in New Issue
Block a user