From 9715ad5acad9a42b65efd64b6c7fbe157f949bfb Mon Sep 17 00:00:00 2001 From: Stefan Werner Date: Thu, 16 Jul 2020 09:25:55 +0200 Subject: macOS: Support arm64 architecture. Enabling all `make deps` dependencies with the exception of Embree and OIDN. After that, Blender can be compiled on an Apple Silicon Mac just like on any Intel based Mac. There are still compiler warnings that need to be investigated and there are probably a couple of bug still to be discovered and to be fixed. Most patches to the dependencies are simple and are about disabling SSE and setting the proper architecture to compiile for. Notable exception is Python, where I back ported a yet to be accepted PR for upstream Python: https://github.com/python/cpython/pull/21249 Cross compiling or buliding a Universal Binary is not supported yet. The minimum macOS target version for x86_64 remains at 10.13, the target for arm64 is 11.00. Differential Revision: https://developer.blender.org/D8236 --- build_files/build_environment/cmake/x264.cmake | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'build_files/build_environment/cmake/x264.cmake') diff --git a/build_files/build_environment/cmake/x264.cmake b/build_files/build_environment/cmake/x264.cmake index 96bf031ce83..993e4591cb7 100644 --- a/build_files/build_environment/cmake/x264.cmake +++ b/build_files/build_environment/cmake/x264.cmake @@ -22,9 +22,14 @@ endif() if(APPLE) - set(X264_CONFIGURE_ENV - export AS=${LIBDIR}/nasm/bin/nasm - ) + if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64") + set(X264_EXTRA_ARGS ${X264_EXTRA_ARGS} "--disable-asm") + set(X264_CONFIGURE_ENV echo .) + else() + set(X264_CONFIGURE_ENV + export AS=${LIBDIR}/nasm/bin/nasm + ) + endif() else() set(X264_CONFIGURE_ENV echo .) endif() -- cgit v1.2.3