Linux builds now link LLVM statically, fixed Qt libpng issue, moved to single AppImage

This commit is contained in:
Zion Nimchuk 2017-07-21 12:43:08 -07:00 committed by Ani
parent 1bef748dc4
commit f8e57147b0
3 changed files with 88 additions and 33 deletions

View file

@ -86,6 +86,8 @@ endif()
if(NOT MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions")
# This hides our LLVM from mesa's LLVM, otherwise we get some unresolvable conflicts.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--exclude-libs,ALL")
if(WIN32)
set(CMAKE_RC_COMPILER_INIT windres)
enable_language(RC)
@ -106,9 +108,10 @@ if(NOT MSVC)
CHECK_C_COMPILER_FLAG("-no-pie" HAS_NO_PIE)
if(HAS_NO_PIE)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -no-pie")
else()
CHECK_C_COMPILER_FLAG("-nopie" HAS_NO_PIE)
if(HAS_NO_PIE)
endif()
CHECK_C_COMPILER_FLAG("-nopie" HAS_NOPIE)
if(HAS_NOPIE)
if (NOT HAS_NO_PIE)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -nopie")
endif()
endif()
@ -211,16 +214,10 @@ if(NOT LLVM_FOUND)
else()
add_definitions(${LLVM_DEFINITIONS})
add_definitions(-DLLVM_AVAILABLE)
#Use static linking for windows binary but always dynamic on *nix
if (WIN32)
if (CMAKE_BUILD_TYPE STREQUAL "Release")
llvm_map_components_to_libnames(LLVM_LIBS mcjit vectorize ipo x86codegen x86disassembler)
else()
llvm_map_components_to_libnames(LLVM_LIBS mcjit vectorize ipo x86codegen x86disassembler mcdisassembler)
endif()
if (CMAKE_BUILD_TYPE STREQUAL "Release")
llvm_map_components_to_libnames(LLVM_LIBS mcjit vectorize ipo x86codegen x86disassembler)
else()
set(LLVM_LIBS LLVM)
llvm_map_components_to_libnames(LLVM_LIBS mcjit vectorize ipo x86codegen x86disassembler mcdisassembler)
endif()
if (NOT MSVC)