Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support building assembly files for mingw-w64 on arm64 with CMake. #276

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,18 +89,22 @@ if(MSVC)
else()
set(_default_asm masm)
endif()
elseif(BOOST_CONTEXT_ARCHITECTURE STREQUAL arm64 AND MINGW)
set(_default_asm armclang)
else()
set(_default_asm gas)
endif()

set(BOOST_CONTEXT_ASSEMBLER "${_default_asm}" CACHE STRING "Boost.Context assembler (masm, gas, armasm)")
set_property(CACHE BOOST_CONTEXT_ASSEMBLER PROPERTY STRINGS masm gas armasm)
set(BOOST_CONTEXT_ASSEMBLER "${_default_asm}" CACHE STRING "Boost.Context assembler (masm, gas, armasm, armclang)")
set_property(CACHE BOOST_CONTEXT_ASSEMBLER PROPERTY STRINGS masm gas armasm armclang)

unset(_default_asm)

## Assembler source suffix

if(BOOST_CONTEXT_BINARY_FORMAT STREQUAL pe)
if(BOOST_CONTEXT_ASSEMBLER STREQUAL armclang)
set(_default_ext .S)
elseif(BOOST_CONTEXT_BINARY_FORMAT STREQUAL pe)
set(_default_ext .asm)
elseif(BOOST_CONTEXT_ASSEMBLER STREQUAL gas)
set(_default_ext .S)
Expand Down Expand Up @@ -135,7 +139,7 @@ message(STATUS "Boost.Context: "
# Enable the right assembler

if(BOOST_CONTEXT_IMPLEMENTATION STREQUAL "fcontext")
if(BOOST_CONTEXT_ASSEMBLER STREQUAL gas)
if(BOOST_CONTEXT_ASSEMBLER STREQUAL gas OR BOOST_CONTEXT_ASSEMBLER STREQUAL armclang)
if(CMAKE_CXX_PLATFORM_ID MATCHES "Cygwin")
enable_language(ASM-ATT)
else()
Expand Down
Loading