From 2a6d037eab50f1ceb1734c71a5bade44f599e39d Mon Sep 17 00:00:00 2001 From: proller Date: Mon, 14 May 2018 20:28:26 +0300 Subject: [PATCH] Build fixes (#2360) --- cmake/find_llvm.cmake | 2 +- dbms/CMakeLists.txt | 4 +--- dbms/src/Server/Compiler-5.0.0/CMakeLists.txt | 5 ++--- dbms/src/Server/Compiler-6.0.0/CMakeLists.txt | 4 +--- dbms/src/Server/Compiler-7.0.0/CMakeLists.txt | 5 ++--- debian/pbuilder-hooks/A00ccache | 1 + 6 files changed, 8 insertions(+), 13 deletions(-) diff --git a/cmake/find_llvm.cmake b/cmake/find_llvm.cmake index a2006e37c64..22195c85f2f 100644 --- a/cmake/find_llvm.cmake +++ b/cmake/find_llvm.cmake @@ -1,5 +1,5 @@ option (ENABLE_EMBEDDED_COMPILER "Set to TRUE to enable support for 'compile' option for query execution" 1) -option (USE_INTERNAL_LLVM_LIBRARY "Use bundled or system LLVM library. Default: system library for quicker developer builds." 0) +option (USE_INTERNAL_LLVM_LIBRARY "Use bundled or system LLVM library. Default: system library for quicker developer builds." ${APPLE}) if (ENABLE_EMBEDDED_COMPILER) if (USE_INTERNAL_LLVM_LIBRARY AND NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/llvm/llvm/CMakeLists.txt") diff --git a/dbms/CMakeLists.txt b/dbms/CMakeLists.txt index da199163994..45695beb9c1 100644 --- a/dbms/CMakeLists.txt +++ b/dbms/CMakeLists.txt @@ -104,9 +104,7 @@ if (USE_EMBEDDED_COMPILER) if (TERMCAP_LIBRARY) list(APPEND REQUIRED_LLVM_LIBRARIES ${TERMCAP_LIBRARY}) endif () - if (LTDL_LIBRARY) - list(APPEND REQUIRED_LLVM_LIBRARIES ${LTDL_LIBRARY}) - endif () + list(APPEND REQUIRED_LLVM_LIBRARIES ${CMAKE_DL_LIBS}) target_link_libraries (dbms ${REQUIRED_LLVM_LIBRARIES}) target_include_directories (dbms BEFORE PUBLIC ${LLVM_INCLUDE_DIRS}) diff --git a/dbms/src/Server/Compiler-5.0.0/CMakeLists.txt b/dbms/src/Server/Compiler-5.0.0/CMakeLists.txt index 076eef6921d..5a29d3bd8ae 100644 --- a/dbms/src/Server/Compiler-5.0.0/CMakeLists.txt +++ b/dbms/src/Server/Compiler-5.0.0/CMakeLists.txt @@ -12,9 +12,8 @@ llvm_map_components_to_libnames(REQUIRED_LLVM_LIBRARIES all) if (TERMCAP_LIBRARY) list(APPEND REQUIRED_LLVM_LIBRARIES ${TERMCAP_LIBRARY}) endif () -if (LTDL_LIBRARY) - list(APPEND REQUIRED_LLVM_LIBRARIES ${LTDL_LIBRARY}) -endif () +list(APPEND REQUIRED_LLVM_LIBRARIES ${CMAKE_DL_LIBS}) + message(STATUS "Using LLVM ${LLVM_VERSION}: ${LLVM_INCLUDE_DIRS} : ${REQUIRED_LLVM_LIBRARIES}") diff --git a/dbms/src/Server/Compiler-6.0.0/CMakeLists.txt b/dbms/src/Server/Compiler-6.0.0/CMakeLists.txt index 23c7ea61c31..d7123ea3f07 100644 --- a/dbms/src/Server/Compiler-6.0.0/CMakeLists.txt +++ b/dbms/src/Server/Compiler-6.0.0/CMakeLists.txt @@ -12,9 +12,7 @@ llvm_map_components_to_libnames(REQUIRED_LLVM_LIBRARIES all) if (TERMCAP_LIBRARY) list(APPEND REQUIRED_LLVM_LIBRARIES ${TERMCAP_LIBRARY}) endif () -if (LTDL_LIBRARY) - list(APPEND REQUIRED_LLVM_LIBRARIES ${LTDL_LIBRARY}) -endif () +list(APPEND REQUIRED_LLVM_LIBRARIES ${CMAKE_DL_LIBS}) message(STATUS "Using LLVM ${LLVM_VERSION}: ${LLVM_INCLUDE_DIRS} : ${REQUIRED_LLVM_LIBRARIES}") diff --git a/dbms/src/Server/Compiler-7.0.0/CMakeLists.txt b/dbms/src/Server/Compiler-7.0.0/CMakeLists.txt index 809f8604366..15f6234dfa9 100644 --- a/dbms/src/Server/Compiler-7.0.0/CMakeLists.txt +++ b/dbms/src/Server/Compiler-7.0.0/CMakeLists.txt @@ -12,9 +12,8 @@ llvm_map_components_to_libnames(REQUIRED_LLVM_LIBRARIES all) if (TERMCAP_LIBRARY) list(APPEND REQUIRED_LLVM_LIBRARIES ${TERMCAP_LIBRARY}) endif () -if (LTDL_LIBRARY) - list(APPEND REQUIRED_LLVM_LIBRARIES ${LTDL_LIBRARY}) -endif () +list(APPEND REQUIRED_LLVM_LIBRARIES ${CMAKE_DL_LIBS}) + message(STATUS "Using LLVM ${LLVM_VERSION}: ${LLVM_INCLUDE_DIRS} : ${REQUIRED_LLVM_LIBRARIES}") diff --git a/debian/pbuilder-hooks/A00ccache b/debian/pbuilder-hooks/A00ccache index a5d1d33b428..b8bf8d579c0 100755 --- a/debian/pbuilder-hooks/A00ccache +++ b/debian/pbuilder-hooks/A00ccache @@ -12,5 +12,6 @@ if [ -n "$CCACHE_DIR" ]; then chmod -R a+rwx $CCACHE_DIR || true fi +df -h ccache --show-stats ccache -M ${CCACHE_SIZE:=32G}