mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge #9130 'build: Fix for macOS 10.14/mojave'
fix #9050 Q: (from From #7891) > It turns out there's a difference between executing > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang > and /usr/bin/clang. CMake was picking up the former and with that it left off > a key include path. Why? A: /usr/bin/clang is a shim that uses libxcselect/libxcrun under the hood. $ otool -L /usr/bin/clang /usr/bin/clang: /usr/lib/libxcselect.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.200.5) From https://macops.ca/developer-binaries-on-os-x-xcode-select-and-xcrun/ : > this shim binary loads functions in libxcselect.dylib that can locate the > path to the real binary, depending on how the system has been configured. One > part of this process is to check whether this path contains > usr/lib/libxcrun.dylib, and the xcrun tool, in which case it will invoke > xcrun to run the binary. > ... > (If all of this isn’t yet enough indirection for you, /usr/bin/xcrun itself > is a shim, and so libxcselect.dylib contains code to detect whether the > executed xcrun is a shim. Look for the __xcrun_shim segment in the __DATA > section output by the command: pagestuff /usr/bin/xcrun -a.)
This commit is contained in:
commit
edcf640f59
4
third-party/CMakeLists.txt
vendored
4
third-party/CMakeLists.txt
vendored
@ -98,6 +98,10 @@ else()
|
||||
set(DEPS_C_COMPILER "${CMAKE_C_COMPILER}")
|
||||
endif()
|
||||
|
||||
if(CMAKE_OSX_SYSROOT)
|
||||
set(DEPS_C_COMPILER "${DEPS_C_COMPILER} -isysroot${CMAKE_OSX_SYSROOT}")
|
||||
endif()
|
||||
|
||||
# Cross compiling: use these for dependencies built for the
|
||||
# HOST system, when not crosscompiling these should be the
|
||||
# same as DEPS_*. Except when targeting Unix in which case
|
||||
|
11
third-party/cmake/BuildLuajit.cmake
vendored
11
third-party/cmake/BuildLuajit.cmake
vendored
@ -50,8 +50,17 @@ set(INSTALLCMD_UNIX ${MAKE_PRG} CFLAGS=-fPIC
|
||||
install)
|
||||
|
||||
if(UNIX)
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
# Set MACOSX_DEPLOYMENT_TARGET (else luajit defaults to 10.4). #9050
|
||||
# https://github.com/LuaJIT/LuaJIT/blob/b025b01c5b9d23f6218c7d72b7aafa3f1ab1e08a/src/Makefile#L301-L303
|
||||
set(DEPLOYMENT_TARGET "MACOSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}")
|
||||
else()
|
||||
set(DEPLOYMENT_TARGET "")
|
||||
endif()
|
||||
|
||||
BuildLuaJit(INSTALL_COMMAND ${INSTALLCMD_UNIX}
|
||||
CC=${DEPS_C_COMPILER} PREFIX=${DEPS_INSTALL_DIR})
|
||||
CC=${DEPS_C_COMPILER} PREFIX=${DEPS_INSTALL_DIR}
|
||||
${DEPLOYMENT_TARGET})
|
||||
|
||||
elseif(MINGW AND CMAKE_CROSSCOMPILING)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user