boostorg / context

307 stars 150 forks source link

Build x86_64 on MacOS with apple M1 arm64. #223

Closed TemplateVoid closed 1 year ago

TemplateVoid commented 1 year ago

Hi! I am trying to build x86_64-binaries on apple m1 host-machine with next command: cmake ../test -DCMAKE_INSTALL_PREFIX=../Install -DCMAKE_OSX_ARCHITECTURES=x86_64

It gives me the following results:

-- Boost.Context: architecture arm64, binary format mach-o, ABI aapcs, assembler gas, suffix .S, implementation fcontext

Is it possible to build x86_64 binaries this way? Or i need x86_64 host machine...

kassane commented 1 year ago

You can try with this fork to cross-compile: https://github.com/kassane/context (w/ zig build). Unfortunately only arm64-windows got problems with the masm extension as it supports mingw.