mirror of
https://github.com/neovim/neovim.git
synced 2024-12-24 05:05:00 -07:00
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
This commit is contained in:
parent
97f1222005
commit
1f0fc4e452
7
third-party/cmake/BuildLuajit.cmake
vendored
7
third-party/cmake/BuildLuajit.cmake
vendored
@ -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=
|
||||
|
Loading…
Reference in New Issue
Block a user