Merge pull request #12624 from qvacua/build-arm64-mac

This commit is contained in:
James McCoy 2020-12-13 21:25:04 -05:00 committed by GitHub
commit d6115c9964
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 13 deletions

View File

@ -352,8 +352,8 @@ if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
add_definitions(-D_GNU_SOURCE)
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SIZEOF_VOID_P EQUAL 8)
# Required for luajit.
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT PREFER_LUA AND LUAJIT_VERSION LESS "2.1.0-beta3")
# Required for luajit < 2.1.0-beta3.
set(CMAKE_EXE_LINKER_FLAGS
"${CMAKE_EXE_LINKER_FLAGS} -pagezero_size 10000 -image_base 100000000")
set(CMAKE_SHARED_LINKER_FLAGS

View File

@ -292,8 +292,9 @@ local constants = {
}
for k, v in pairs(constants) do
vim.tbl_add_reverse_lookup(v)
protocol[k] = v
local tbl = vim.deepcopy(v)
vim.tbl_add_reverse_lookup(tbl)
protocol[k] = tbl
end
--[=[
@ -623,7 +624,11 @@ function protocol.make_client_capabilities()
codeActionLiteralSupport = {
codeActionKind = {
valueSet = vim.tbl_values(protocol.CodeActionKind);
valueSet = (function()
local res = vim.tbl_values(protocol.CodeActionKind)
table.sort(res)
return res
end)();
};
};
};
@ -643,7 +648,7 @@ function protocol.make_client_capabilities()
completionItemKind = {
valueSet = (function()
local res = {}
for k in pairs(protocol.CompletionItemKind) do
for k in ipairs(protocol.CompletionItemKind) do
if type(k) == 'number' then table.insert(res, k) end
end
return res
@ -689,7 +694,7 @@ function protocol.make_client_capabilities()
symbolKind = {
valueSet = (function()
local res = {}
for k in pairs(protocol.SymbolKind) do
for k in ipairs(protocol.SymbolKind) do
if type(k) == 'number' then table.insert(res, k) end
end
return res
@ -708,7 +713,7 @@ function protocol.make_client_capabilities()
symbolKind = {
valueSet = (function()
local res = {}
for k in pairs(protocol.SymbolKind) do
for k in ipairs(protocol.SymbolKind) do
if type(k) == 'number' then table.insert(res, k) end
end
return res

View File

@ -147,8 +147,8 @@ set(MSGPACK_URL https://github.com/msgpack/msgpack-c/releases/download/cpp-3.0.0
set(MSGPACK_SHA256 bfbb71b7c02f806393bc3cbc491b40523b89e64f83860c58e3e54af47de176e4)
# https://github.com/LuaJIT/LuaJIT/tree/v2.1
set(LUAJIT_URL https://github.com/LuaJIT/LuaJIT/archive/f0e865dd4861520258299d0f2a56491bd9d602e1.tar.gz)
set(LUAJIT_SHA256 ad5077bd861241bf5e50ae4bf543d291c5fcffab95ccc3218401131f503e45bd)
set(LUAJIT_URL https://github.com/LuaJIT/LuaJIT/archive/1d8b747c161db457e032a023ebbff511f5de5ec2.tar.gz)
set(LUAJIT_SHA256 20a159c38a98ecdb6368e8d655343b6036622a29a1621da9dc303f7ed9bf37f3)
set(LUA_URL https://www.lua.org/ftp/lua-5.1.5.tar.gz)
set(LUA_SHA256 2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333)

View File

@ -64,9 +64,12 @@ set(INSTALLCMD_UNIX ${MAKE_PRG} CFLAGS=-fPIC
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}")
if(CMAKE_OSX_DEPLOYMENT_TARGET)
set(DEPLOYMENT_TARGET "MACOSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}")
else()
# Use the same target as our nightly builds
set(DEPLOYMENT_TARGET "MACOSX_DEPLOYMENT_TARGET=10.11")
endif()
else()
set(DEPLOYMENT_TARGET "")
endif()