Build: Changes for make deps to work on Linux arm64 again
This is not an officially supported platform, but it was working before so might as well keep it up to date. * Tweak logic for various BLENDER_PLATFORM_ARM checks * Use linux_arm64 name for folders, matching Windows and macOS * CUDA is enabled, SYCL and HIP are not * Tested to work on Rocky Linux 8
This commit is contained in:
@@ -161,6 +161,9 @@ CPU:=$(shell uname -m)
|
||||
ifeq ($(CPU),x86_64)
|
||||
CPU:=x64
|
||||
endif
|
||||
ifeq ($(CPU),aarch64)
|
||||
CPU:=arm64
|
||||
endif
|
||||
ifeq ($(OS_NCASE),darwin)
|
||||
OS_LIBDIR:=macos
|
||||
else
|
||||
|
||||
@@ -91,15 +91,13 @@ if(NOT APPLE)
|
||||
include(cmake/xr_openxr.cmake)
|
||||
if(NOT BLENDER_PLATFORM_ARM)
|
||||
include(cmake/hiprt.cmake)
|
||||
endif()
|
||||
if(NOT BLENDER_PLATFORM_WINDOWS_ARM)
|
||||
include(cmake/dpcpp.cmake)
|
||||
include(cmake/dpcpp_deps.cmake)
|
||||
endif()
|
||||
if(NOT WIN32)
|
||||
include(cmake/igc.cmake)
|
||||
include(cmake/gmmlib.cmake)
|
||||
include(cmake/ocloc.cmake)
|
||||
if(NOT WIN32)
|
||||
include(cmake/igc.cmake)
|
||||
include(cmake/gmmlib.cmake)
|
||||
include(cmake/ocloc.cmake)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
include(cmake/ispc.cmake)
|
||||
|
||||
@@ -36,7 +36,7 @@ if(NOT BLENDER_PLATFORM_ARM)
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT APPLE)
|
||||
if(NOT APPLE AND NOT BLENDER_PLATFORM_ARM)
|
||||
if(WIN32)
|
||||
# Levels below -O2 don't work well for Embree+SYCL.
|
||||
string(REGEX REPLACE "-O[A-Za-z0-9]" "" EMBREE_CLANG_CMAKE_CXX_FLAGS_DEBUG ${BLENDER_CLANG_CMAKE_C_FLAGS_DEBUG})
|
||||
@@ -99,7 +99,7 @@ ExternalProject_Add(external_embree
|
||||
INSTALL_DIR ${LIBDIR}/embree
|
||||
)
|
||||
|
||||
if(NOT APPLE)
|
||||
if(NOT APPLE AND NOT BLENDER_PLATFORM_ARM)
|
||||
add_dependencies(
|
||||
external_embree
|
||||
external_tbb
|
||||
|
||||
@@ -56,17 +56,13 @@ else()
|
||||
set(GMP_OPTIONS --enable-static --disable-shared )
|
||||
endif()
|
||||
|
||||
if(APPLE AND NOT BLENDER_PLATFORM_ARM)
|
||||
set(GMP_OPTIONS
|
||||
${GMP_OPTIONS}
|
||||
--with-pic
|
||||
)
|
||||
elseif(UNIX AND NOT APPLE)
|
||||
set(GMP_OPTIONS
|
||||
${GMP_OPTIONS}
|
||||
--with-pic
|
||||
--enable-fat
|
||||
)
|
||||
if(UNIX)
|
||||
if(NOT (APPLE AND BLENDER_PLATFORN_ARM))
|
||||
set(GMP_OPTIONS ${GMP_OPTIONS} --with-pic)
|
||||
endif()
|
||||
if(NOT (APPLE OR BLENDER_PLATFORM_ARM))
|
||||
set(GMP_OPTIONS ${GMP_OPTIONS} --enable-fat)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Boolean crashes with Arm assembly, see #103423.
|
||||
|
||||
@@ -21,18 +21,22 @@ else()
|
||||
-DLEVEL_ZERO_ROOT=${LIBDIR}/level-zero
|
||||
)
|
||||
|
||||
# x64 platforms support SyCL, ARM64 don't
|
||||
if(NOT BLENDER_PLATFORM_WINDOWS_ARM)
|
||||
# x64 platforms support SyCL and HIP, ARM64 doesn't
|
||||
if(NOT BLENDER_PLATFORM_ARM)
|
||||
set(OIDN_EXTRA_ARGS
|
||||
${OIDN_EXTRA_ARGS}
|
||||
-DOIDN_DEVICE_SYCL=ON
|
||||
-DOIDN_DEVICE_SYCL_AOT=OFF
|
||||
-DOIDN_DEVICE_CUDA=ON
|
||||
-DOIDN_DEVICE_HIP=ON)
|
||||
elseif(UNIX)
|
||||
set(OIDN_EXTRA_ARGS
|
||||
${OIDN_EXTRA_ARGS}
|
||||
-DOIDN_DEVICE_CUDA=ON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WIN32 AND NOT BLENDER_PLATFORM_WINDOWS_ARM)
|
||||
if(WIN32 AND NOT BLENDER_PLATFORM_ARM)
|
||||
set(OIDN_EXTRA_ARGS
|
||||
${OIDN_EXTRA_ARGS}
|
||||
-DTBB_DEBUG_LIBRARY=${LIBDIR}/tbb/lib/tbb.lib
|
||||
@@ -48,7 +52,7 @@ if(WIN32 AND NOT BLENDER_PLATFORM_WINDOWS_ARM)
|
||||
-DCMAKE_EXE_LINKER_FLAGS=-L"${LIBDIR}/dpcpp/lib"
|
||||
)
|
||||
else()
|
||||
if(NOT (APPLE OR BLENDER_PLATFORM_WINDOWS_ARM))
|
||||
if(NOT (APPLE OR BLENDER_PLATFORM_ARM))
|
||||
set(OIDN_EXTRA_ARGS
|
||||
${OIDN_EXTRA_ARGS}
|
||||
-DCMAKE_CXX_COMPILER=${LIBDIR}/dpcpp/bin/clang++
|
||||
@@ -99,7 +103,7 @@ add_dependencies(
|
||||
external_python
|
||||
)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
if(NOT (APPLE OR BLENDER_PLATFORM_ARM))
|
||||
add_dependencies(
|
||||
external_openimagedenoise
|
||||
external_dpcpp
|
||||
|
||||
@@ -40,7 +40,15 @@ yum -y install scl-utils-build
|
||||
yum -y install gcc-toolset-11
|
||||
|
||||
# Repository for CUDA (`nvcc`).
|
||||
dnf config-manager --add-repo http://developer.download.nvidia.com/compute/cuda/repos/rhel8/$(uname -i)/cuda-rhel8.repo
|
||||
CUDA_ARCH=$(uname -i)
|
||||
|
||||
# For RHEL8 there is no aarch64 repo, instead use sbsa which works for device binaries.
|
||||
# For RHEL9 there is an aarch64 repo, and this fallback will no longer be needed.
|
||||
if [ "$CUDA_ARCH" = "aarch64" ]; then
|
||||
CUDA_ARCH="sbsa"
|
||||
fi
|
||||
|
||||
dnf config-manager --add-repo http://developer.download.nvidia.com/compute/cuda/repos/rhel8/$CUDA_ARCH/cuda-rhel8.repo
|
||||
|
||||
# Install packages needed for Blender's dependencies.
|
||||
PACKAGES_FOR_LIBS=(
|
||||
|
||||
@@ -16,3 +16,15 @@
|
||||
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
|
||||
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
|
||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
|
||||
--- config.guess 2024-07-11 13:42:08.171028863 +0200
|
||||
+++ config.guess 2024-07-11 13:41:13.921323750 +0200
|
||||
@@ -861,6 +861,9 @@
|
||||
x86_64:Linux:*:*)
|
||||
echo x86_64-unknown-linux-gnu
|
||||
exit 0 ;;
|
||||
+ aarch64:Linux:*:*)
|
||||
+ echo aarch64-unknown-linux-gnu
|
||||
+ exit 0 ;;
|
||||
i*86:Linux:*:*)
|
||||
# The BFD linker knows what the default object file format is, so
|
||||
# first see if it will tell us. cd to the root directory to prevent
|
||||
|
||||
@@ -16,7 +16,11 @@ else()
|
||||
set(LIBDIR_NATIVE_ABI ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_NAME})
|
||||
|
||||
# Path to precompiled libraries with known glibc 2.28 ABI.
|
||||
set(LIBDIR_GLIBC228_ABI ${CMAKE_SOURCE_DIR}/lib/linux_x64)
|
||||
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64")
|
||||
set(LIBDIR_GLIBC228_ABI ${CMAKE_SOURCE_DIR}/lib/linux_arm64)
|
||||
else()
|
||||
set(LIBDIR_GLIBC228_ABI ${CMAKE_SOURCE_DIR}/lib/linux_x64)
|
||||
endif()
|
||||
|
||||
# Choose the best suitable libraries.
|
||||
if(EXISTS ${LIBDIR_NATIVE_ABI})
|
||||
|
||||
@@ -108,6 +108,8 @@ def get_effective_architecture(args: argparse.Namespace) -> str:
|
||||
# Normalize the architecture name.
|
||||
if architecture in {"x86_64", "amd64"}:
|
||||
architecture = "x64"
|
||||
if architecture == "aarch64":
|
||||
architecture = "arm64"
|
||||
|
||||
assert (architecture in {"x64", "arm64"})
|
||||
|
||||
|
||||
@@ -102,12 +102,11 @@ else()
|
||||
endif()
|
||||
|
||||
# Keep until APPLE/ARM libraries are updated.
|
||||
if(APPLE OR WIN32)
|
||||
if(CMAKE_OSX_ARCHITECTURES MATCHES arm64 OR CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64")
|
||||
list(APPEND INC_SYS
|
||||
${IMATH_INCLUDE_DIRS}
|
||||
)
|
||||
endif()
|
||||
if((APPLE AND CMAKE_OSX_ARCHITECTURES MATCHES arm64) OR
|
||||
(CMAKE_SYSTEM_PROCESSOR MATCHES "ARM64|aarch64"))
|
||||
list(APPEND INC_SYS
|
||||
${IMATH_INCLUDE_DIRS}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WITH_IMAGE_OPENJPEG)
|
||||
|
||||
Reference in New Issue
Block a user