From 28722d1c8b78d4e5f5ba0a6994632a12a61bff89 Mon Sep 17 00:00:00 2001 From: Vasanth Karanam Date: Thu, 28 Aug 2025 18:19:19 +0100 Subject: [PATCH 1/2] Add Windows ARM64 support Fixes issue : https://github.com/boostorg/boost/issues/1070 Related to PR: https://github.com/boostorg/boost/pull/1077 --- build/Jamfile.v2 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 5c767a65..1a6efbb2 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -189,12 +189,15 @@ alias asm_sources gcc ; -# ARM64/AAPCS/PE +# ARM64/AAPCS/PE — also allow ms for Windows on ARM64 (MSVC) +# ms only applies when +# arm 64 pe, +# so x86/x64 MSVC builds are unaffected. alias asm_sources : asm/make_arm64_aapcs_pe_armasm.asm asm/jump_arm64_aapcs_pe_armasm.asm asm/ontop_arm64_aapcs_pe_armasm.asm - : aapcs + : aapcs,ms 64 arm pe From 68ea30dfd73e5bc1d803208abc962f45235be91c Mon Sep 17 00:00:00 2001 From: Vasanth Karanam Date: Thu, 28 Aug 2025 18:19:19 +0100 Subject: [PATCH 2/2] 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 --- .github/workflows/ci.yml | 2 +- build/Jamfile.v2 | 8 +++----- test/Jamfile.v2 | 24 ++++++++++++++++++++++-- 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3b5ce5a0..8c84967a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,7 +54,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ windows-2022, windows-2025 ] + os: [ windows-2022, windows-2025, windows-11-arm ] runs-on: ${{matrix.os}} diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 1a6efbb2..b9a34958 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -18,6 +18,7 @@ import config : requires ; project : common-requirements $(boost_dependencies) : requirements + windows,arm,64:winfib windows:_WIN32_WINNT=0x0601 linux,gcc,on:-fsplit-stack linux,gcc,on:-DBOOST_USE_SEGMENTED_STACKS @@ -189,15 +190,12 @@ alias asm_sources gcc ; -# ARM64/AAPCS/PE — also allow ms for Windows on ARM64 (MSVC) -# ms only applies when -# arm 64 pe, -# so x86/x64 MSVC builds are unaffected. +# ARM64/AAPCS/PE alias asm_sources : asm/make_arm64_aapcs_pe_armasm.asm asm/jump_arm64_aapcs_pe_armasm.asm asm/ontop_arm64_aapcs_pe_armasm.asm - : aapcs,ms + : aapcs 64 arm pe diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index dbd6a9f1..c211293a 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -41,6 +41,10 @@ rule native-impl ( properties * ) { result = no ; } + else if ( windows in $(properties) && arm in $(properties) && 64 in $(properties) ) + { + return winfib ; # for windows arm64 always use winfib and skip ASM + } else if ( ! ( windows in $(properties) ) ) { result = ucontext ; @@ -52,6 +56,22 @@ rule native-impl ( properties * ) return $(result) ; } +rule fcontext-impl ( properties * ) +{ + # Skip on Windows ARM64 + if ( windows in $(properties) && + arm in $(properties) && + 64 in $(properties) ) + { + return no ; # for windows arm64 always use winfib and skip fcontext + } + else + { + return fcontext ; + } +} + + obj is_libstdcxx : is_libstdcxx.cpp ; explicit is_libstdcxx ; @@ -95,7 +115,7 @@ test-suite minimal : [ run test_fiber.cpp : : : - fcontext + @fcontext-impl [ requires cxx11_auto_declarations cxx11_constexpr cxx11_defaulted_functions @@ -150,7 +170,7 @@ test-suite minimal : [ run test_callcc.cpp : : : - fcontext + @fcontext-impl [ requires cxx11_auto_declarations cxx11_constexpr cxx11_defaulted_functions