mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 12:45:17 -07:00
build: remove CMAKE_CROSSCOMPILING code #18914
This is rarely, if ever, used and certainly not tested. It's likely this isn't functional anymore.
This commit is contained in:
parent
f90174c98c
commit
3c7b91da10
@ -71,13 +71,8 @@ else()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CMAKE_CROSSCOMPILING AND NOT UNIX)
|
||||
list(INSERT CMAKE_FIND_ROOT_PATH 0 ${DEPS_PREFIX})
|
||||
list(INSERT CMAKE_PREFIX_PATH 0 ${DEPS_PREFIX}/../host/bin)
|
||||
else()
|
||||
list(INSERT CMAKE_PREFIX_PATH 0 ${DEPS_PREFIX})
|
||||
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${DEPS_PREFIX}/lib/pkgconfig")
|
||||
endif()
|
||||
list(INSERT CMAKE_PREFIX_PATH 0 ${DEPS_PREFIX})
|
||||
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${DEPS_PREFIX}/lib/pkgconfig")
|
||||
|
||||
# used for check_c_compiler_flag
|
||||
include(CheckCCompilerFlag)
|
||||
|
24
third-party/CMakeLists.txt
vendored
24
third-party/CMakeLists.txt
vendored
@ -119,23 +119,11 @@ if(CMAKE_OSX_SYSROOT)
|
||||
endif()
|
||||
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
|
||||
# want all the dependencies to use the same compiler.
|
||||
if(CMAKE_CROSSCOMPILING AND NOT UNIX)
|
||||
set(HOSTDEPS_INSTALL_DIR "${CMAKE_BINARY_DIR}/host")
|
||||
set(HOSTDEPS_BIN_DIR "${HOSTDEPS_INSTALL_DIR}/bin")
|
||||
set(HOSTDEPS_LIB_DIR "${HOSTDEPS_INSTALL_DIR}/lib")
|
||||
set(HOSTDEPS_C_COMPILER "${HOST_C_COMPILER}")
|
||||
set(HOSTDEPS_CXX_COMPILER "${HOST_CXX_COMPILER}")
|
||||
else()
|
||||
set(HOSTDEPS_INSTALL_DIR "${DEPS_INSTALL_DIR}")
|
||||
set(HOSTDEPS_BIN_DIR "${DEPS_BIN_DIR}")
|
||||
set(HOSTDEPS_LIB_DIR "${DEPS_LIB_DIR}")
|
||||
set(HOSTDEPS_C_COMPILER "${DEPS_C_COMPILER}")
|
||||
set(HOSTDEPS_CXX_COMPILER "${DEPS_CXX_COMPILER}")
|
||||
endif()
|
||||
set(HOSTDEPS_INSTALL_DIR "${DEPS_INSTALL_DIR}")
|
||||
set(HOSTDEPS_BIN_DIR "${DEPS_BIN_DIR}")
|
||||
set(HOSTDEPS_LIB_DIR "${DEPS_LIB_DIR}")
|
||||
set(HOSTDEPS_C_COMPILER "${DEPS_C_COMPILER}")
|
||||
set(HOSTDEPS_CXX_COMPILER "${DEPS_CXX_COMPILER}")
|
||||
|
||||
include(ExternalProject)
|
||||
|
||||
@ -222,7 +210,7 @@ if(USE_BUNDLED_LUAJIT)
|
||||
include(BuildLuajit)
|
||||
endif()
|
||||
|
||||
if(USE_BUNDLED_LUA AND NOT CMAKE_CROSSCOMPILING)
|
||||
if(USE_BUNDLED_LUA)
|
||||
include(BuildLua)
|
||||
endif()
|
||||
|
||||
|
11
third-party/cmake/BuildLibuv.cmake
vendored
11
third-party/cmake/BuildLibuv.cmake
vendored
@ -45,17 +45,6 @@ if(UNIX)
|
||||
CONFIGURE_COMMAND ${UNIX_CFGCMD} MAKE=${MAKE_PRG}
|
||||
INSTALL_COMMAND ${MAKE_PRG} V=1 install)
|
||||
|
||||
elseif(MINGW AND CMAKE_CROSSCOMPILING)
|
||||
# Build libuv for the host
|
||||
BuildLibuv(TARGET libuv_host
|
||||
CONFIGURE_COMMAND sh ${DEPS_BUILD_DIR}/src/libuv_host/autogen.sh && ${DEPS_BUILD_DIR}/src/libuv_host/configure --with-pic --disable-shared --prefix=${HOSTDEPS_INSTALL_DIR} CC=${HOST_C_COMPILER}
|
||||
INSTALL_COMMAND ${MAKE_PRG} V=1 install)
|
||||
|
||||
# Build libuv for the target
|
||||
BuildLibuv(
|
||||
CONFIGURE_COMMAND ${UNIX_CFGCMD} --host=${CROSS_TARGET}
|
||||
INSTALL_COMMAND ${MAKE_PRG} V=1 install)
|
||||
|
||||
elseif(WIN32)
|
||||
|
||||
set(UV_OUTPUT_DIR ${DEPS_BUILD_DIR}/src/libuv/${CMAKE_BUILD_TYPE})
|
||||
|
23
third-party/cmake/BuildLuajit.cmake
vendored
23
third-party/cmake/BuildLuajit.cmake
vendored
@ -76,29 +76,6 @@ if(UNIX)
|
||||
CC=${DEPS_C_COMPILER} PREFIX=${DEPS_INSTALL_DIR}
|
||||
${DEPLOYMENT_TARGET})
|
||||
|
||||
elseif(MINGW AND CMAKE_CROSSCOMPILING)
|
||||
|
||||
# Build luajit for the host
|
||||
BuildLuaJit(TARGET luajit_host
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND ""
|
||||
INSTALL_COMMAND ${INSTALLCMD_UNIX}
|
||||
CC=${HOST_C_COMPILER} PREFIX=${HOSTDEPS_INSTALL_DIR})
|
||||
|
||||
# Build luajit for the target
|
||||
BuildLuaJit(
|
||||
# Similar to Unix + cross - fPIC
|
||||
INSTALL_COMMAND
|
||||
${MAKE_PRG} PREFIX=${DEPS_INSTALL_DIR}
|
||||
BUILDMODE=static install
|
||||
TARGET_SYS=${CMAKE_SYSTEM_NAME}
|
||||
CROSS=${CROSS_TARGET}-
|
||||
HOST_CC=${HOST_C_COMPILER} HOST_CFLAGS=${HOST_C_FLAGS}
|
||||
HOST_LDFLAGS=${HOST_EXE_LINKER_FLAGS}
|
||||
FILE_T=luajit.exe
|
||||
Q=
|
||||
INSTALL_TSYMNAME=luajit.exe)
|
||||
|
||||
elseif(MINGW)
|
||||
|
||||
if(CMAKE_GENERATOR MATCHES "Ninja")
|
||||
|
8
third-party/cmake/BuildLuarocks.cmake
vendored
8
third-party/cmake/BuildLuarocks.cmake
vendored
@ -56,7 +56,7 @@ endif()
|
||||
# Defaults to 5.1 for bundled LuaJIT/Lua.
|
||||
set(LUA_VERSION "5.1")
|
||||
|
||||
if(UNIX OR (MINGW AND CMAKE_CROSSCOMPILING))
|
||||
if(UNIX)
|
||||
|
||||
if(USE_BUNDLED_LUAJIT)
|
||||
list(APPEND LUAROCKS_OPTS
|
||||
@ -123,9 +123,6 @@ list(APPEND THIRD_PARTY_DEPS luarocks)
|
||||
|
||||
if(USE_BUNDLED_LUAJIT)
|
||||
add_dependencies(luarocks luajit)
|
||||
if(MINGW AND CMAKE_CROSSCOMPILING)
|
||||
add_dependencies(luarocks luajit_host)
|
||||
endif()
|
||||
elseif(USE_BUNDLED_LUA)
|
||||
add_dependencies(luarocks lua)
|
||||
endif()
|
||||
@ -196,9 +193,6 @@ if(USE_BUNDLED_BUSTED)
|
||||
set(LUV_DEPS luacheck)
|
||||
if(USE_BUNDLED_LUV)
|
||||
list(APPEND LUV_DEPS luv-static lua-compat-5.3)
|
||||
if(MINGW AND CMAKE_CROSSCOMPILING)
|
||||
list(APPEND LUV_DEPS libuv_host)
|
||||
endif()
|
||||
set(LUV_ARGS "CFLAGS=-O0 -g3 -fPIC")
|
||||
if(USE_BUNDLED_LIBUV)
|
||||
list(APPEND LUV_ARGS LIBUV_DIR=${HOSTDEPS_INSTALL_DIR})
|
||||
|
11
third-party/cmake/BuildLuv.cmake
vendored
11
third-party/cmake/BuildLuv.cmake
vendored
@ -91,16 +91,7 @@ if(USE_BUNDLED_LIBUV)
|
||||
-DCMAKE_PREFIX_PATH=${DEPS_INSTALL_DIR})
|
||||
endif()
|
||||
|
||||
if(MINGW AND CMAKE_CROSSCOMPILING)
|
||||
get_filename_component(TOOLCHAIN ${CMAKE_TOOLCHAIN_FILE} REALPATH)
|
||||
set(LUV_CONFIGURE_COMMAND
|
||||
${LUV_CONFIGURE_COMMAND_COMMON}
|
||||
# Pass toolchain
|
||||
-DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN}
|
||||
"-DCMAKE_C_FLAGS:STRING=${LUV_INCLUDE_FLAGS} -D_WIN32_WINNT=0x0600"
|
||||
# Hack to avoid -rdynamic in Mingw
|
||||
-DCMAKE_SHARED_LIBRARY_LINK_C_FLAGS="")
|
||||
elseif(MSVC)
|
||||
if(MSVC)
|
||||
set(LUV_CONFIGURE_COMMAND
|
||||
${LUV_CONFIGURE_COMMAND_COMMON}
|
||||
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
||||
|
13
third-party/cmake/BuildMsgpack.cmake
vendored
13
third-party/cmake/BuildMsgpack.cmake
vendored
@ -42,18 +42,7 @@ set(MSGPACK_CONFIGURE_COMMAND ${CMAKE_COMMAND} ${DEPS_BUILD_DIR}/src/msgpack
|
||||
set(MSGPACK_BUILD_COMMAND ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE})
|
||||
set(MSGPACK_INSTALL_COMMAND ${CMAKE_COMMAND} --build . --target install --config ${CMAKE_BUILD_TYPE})
|
||||
|
||||
if(MINGW AND CMAKE_CROSSCOMPILING)
|
||||
get_filename_component(TOOLCHAIN ${CMAKE_TOOLCHAIN_FILE} REALPATH)
|
||||
set(MSGPACK_CONFIGURE_COMMAND ${CMAKE_COMMAND} ${DEPS_BUILD_DIR}/src/msgpack
|
||||
-DMSGPACK_BUILD_TESTS=OFF
|
||||
-DMSGPACK_BUILD_EXAMPLES=OFF
|
||||
-DCMAKE_INSTALL_PREFIX=${DEPS_INSTALL_DIR}
|
||||
# Pass toolchain
|
||||
-DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN}
|
||||
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||
# Hack to avoid -rdynamic in Mingw
|
||||
-DCMAKE_SHARED_LIBRARY_LINK_C_FLAGS="")
|
||||
elseif(MSVC)
|
||||
if(MSVC)
|
||||
# Same as Unix without fPIC
|
||||
set(MSGPACK_CONFIGURE_COMMAND ${CMAKE_COMMAND} ${DEPS_BUILD_DIR}/src/msgpack
|
||||
-DMSGPACK_BUILD_TESTS=OFF
|
||||
|
Loading…
Reference in New Issue
Block a user