You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mac's are able to cross compile from x86_64 to arm64. So if you are running an x86, you can cross compile to arm and vice versa. This is useful for the CI where arm builds are in beta.
Our current toolchain files, however do not set the appropriate flags to allow us to cross compile, this means that even if you select the aarch64 toolchain, you will be compiling for x86_64 if your Mac is x86_64.
Solution
Set the appropriate flags to the compiler when the toolchain is set. For arm it is:
When fixing AztecProtocol/aztec-packages#1841
the flags were put in the cmake toolchains file for circuits which does
not get inherited by the barretenberg toolchain files.
Problem
Mac's are able to cross compile from x86_64 to arm64. So if you are running an x86, you can cross compile to arm and vice versa. This is useful for the CI where arm builds are in beta.
Our current toolchain files, however do not set the appropriate flags to allow us to cross compile, this means that even if you select the aarch64 toolchain, you will be compiling for x86_64 if your Mac is x86_64.
Solution
Set the appropriate flags to the compiler when the toolchain is set. For arm it is:
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch arm64") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch arm64")
Note
The fact that the arm build was building for x86_64 was spotted by @kobyhallx
The text was updated successfully, but these errors were encountered: