build: wasm: macos: Avoid to build AOT unsupported platform (macos-arm64)
@@ -20,6 +20,10 @@ endif ()
if (NOT DEFINED WAMR_BUILD_TARGET)
if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm64|aarch64)")
set (WAMR_BUILD_TARGET "AARCH64")
+ if (FLB_SYSTEM_MACOS)
+ message(STATUS "macOS arm64 platform is poor support for AOT loading. Now disabling for it.")
+ set (WAMR_DISABLE_AOT_LOADING 1)
+ endif ()
elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "riscv64")
set (WAMR_BUILD_TARGET "RISCV64")
elseif (CMAKE_SIZEOF_VOID_P EQUAL 8)
@@ -38,7 +42,9 @@ endif ()
set (WAMR_BUILD_MINI_LOADER 0)
set (WAMR_BUILD_INTERP 1)
set (WAMR_BUILD_FAST_INTERP 1)
+if (NOT DEFINED WAMR_DISABLE_AOT_LOADING)
set (WAMR_BUILD_AOT 1)
+endif ()
set (WAMR_BUILD_JIT 0)
set (WAMR_BUILD_LIBC_BUILTIN 1)
if (MSVC)
