Daemon
Daemon copied to clipboard
Let it build on arm64 Mac
You can get it going with arm64 engine + amd64 NaCl like this
brew install <bunch of stuff>
cmake <dir> -DCMAKE_OSX_ARCHITECTURES=arm64 -DOpenAL_ROOT=$(brew --prefix openal-soft)
cp <daemon>/external_deps/macos-amd64-default_10/{nacl_loader,irt_core-amd64.nexe} .
cp <daemon>/external_deps/macos-amd64-default_10/{nacl_loader,irt_core-amd64.nexe} .
Maybe there is a way for it to be done by CMake? Unless I'm wrong FreeBSD does it right by picking Linux stuff.
Maybe that (untested):
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bcc10cb6b..473d94ae4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -250,12 +250,14 @@ if (USE_EXTERNAL_DEPS AND NOT NACL)
set(EXTERNAL_DEPS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/external_deps" CACHE STRING "Directory in which to store the downloaded dependencies.")
set(DEPS_EXT ".tar.xz")
+ set(DEPS_ARCH ${ARCH})
if (WIN32)
set(DEPS_SYSTEM windows)
set(SUPPORTED_${DEPS_SYSTEM}_ARCH amd64 i686)
elseif (APPLE)
set(DEPS_SYSTEM macos)
+ set(DEPS_ARCH amd64)
set(SUPPORTED_${DEPS_SYSTEM}_ARCH amd64)
elseif (LINUX OR FREEBSD)
set(DEPS_SYSTEM linux)
@@ -270,7 +272,7 @@ if (USE_EXTERNAL_DEPS AND NOT NACL)
set(DEPS_COMPILER default)
endif()
- if (DEPS_SYSTEM AND ARCH IN_LIST SUPPORTED_${DEPS_SYSTEM}_ARCH)
+ if (DEPS_SYSTEM AND DEPS_ARCH IN_LIST SUPPORTED_${DEPS_SYSTEM}_ARCH)
set(DEPS_DIR ${EXTERNAL_DEPS_DIR}/${DEPS_SYSTEM}-${ARCH}-${DEPS_COMPILER}_${DEPS_VERSION})
if (DAEMON_PARENT_SCOPE_DIR)
I also notice that SUPPORTED_${DEPS_SYSTEM}_ARCH may be modified to become SUPPORTED_ARCH to simplify things.
Hmmm, maybe, unlike Linux that only provides NaCl in the deps package, the macos deps package will mess with building by providing amd64 libraries…
Hmmm, maybe, unlike Linux that only provides NaCl in the deps package, the macos deps package will mess with building by providing amd64 libraries…
Yep, just tried and that's what happens.