diff options
author | Christian Clason <christian.clason@uni-due.de> | 2019-11-17 21:55:25 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-11-17 12:55:25 -0800 |
commit | 1f0fc4e452e6f7ce07253946b0de21232b21ab9a (patch) | |
tree | 4988b6df12859d4bcb2ef24b751135d456e9a733 | |
parent | 97f1222005838912e127e4180d7b779c82e8356d (diff) | |
download | rneovim-1f0fc4e452e6f7ce07253946b0de21232b21ab9a.tar.gz rneovim-1f0fc4e452e6f7ce07253946b0de21232b21ab9a.tar.bz2 rneovim-1f0fc4e452e6f7ce07253946b0de21232b21ab9a.zip |
build/macOS: set -fno-stack-check for LuaJIT build #11412
Fixes LuaJIT build on macOS Catalina.
ref https://github.com/LuaJIT/LuaJIT/issues/521
ref https://github.com/Homebrew/homebrew-core/pull/46823
-rw-r--r-- | third-party/cmake/BuildLuajit.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/third-party/cmake/BuildLuajit.cmake b/third-party/cmake/BuildLuajit.cmake index 458cfeafda..c0b24fb2a5 100644 --- a/third-party/cmake/BuildLuajit.cmake +++ b/third-party/cmake/BuildLuajit.cmake @@ -42,6 +42,12 @@ function(BuildLuajit) endif() endfunction() +check_c_compiler_flag(-fno-stack-check HAS_NO_STACK_CHECK) +if(CMAKE_SYSTEM_NAME MATCHES "Darwin" AND HAS_NO_STACK_CHECK) + set(NO_STACK_CHECK "CFLAGS+=-fno-stack-check") +else() + set(NO_STACK_CHECK "") +endif() if(CMAKE_SYSTEM_NAME MATCHES "OpenBSD") set(AMD64_ABI "LDFLAGS=-lpthread -lc++abi") else() @@ -50,6 +56,7 @@ endif() set(INSTALLCMD_UNIX ${MAKE_PRG} CFLAGS=-fPIC CFLAGS+=-DLUA_USE_APICHECK CFLAGS+=-DLUA_USE_ASSERT + ${NO_STACK_CHECK} ${AMD64_ABI} CCDEBUG+=-g Q= |