diff --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/CMakeLists.txt index 1dadb6a810efb..0d7fc65cfd3e9 100644 --- a/compiler-rt/lib/builtins/CMakeLists.txt +++ b/compiler-rt/lib/builtins/CMakeLists.txt @@ -674,6 +674,11 @@ if (MINGW) ) endif() +# Don't build enable_execute_stack on arm64 darwin. +if (APPLE) + list(REMOVE_ITEM aarch64_SOURCES enable_execute_stack.c) +endif() + set(amdgcn_SOURCES ${GENERIC_SOURCES}) set(armv4t_SOURCES ${arm_min_SOURCES})