Merge branch 'pyos-llvm-jit' of github.com:yandex/ClickHouse into pyos-llvm-jit

This commit is contained in:
Alexey Milovidov 2018-05-07 13:29:42 +03:00
commit 07162c0594
3 changed files with 12 additions and 2 deletions

View File

@ -1,10 +1,12 @@
option (ENABLE_EMBEDDED_COMPILER "Set to TRUE to enable support for 'compile' option for query execution" 1)
if (ENABLE_EMBEDDED_COMPILER)
set (LLVM_PATHS "/usr/local/lib/llvm")
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
find_package(LLVM CONFIG)
find_package(LLVM CONFIG PATHS ${LLVM_PATHS})
else ()
find_package(LLVM 5 CONFIG)
find_package(LLVM 5 CONFIG PATHS ${LLVM_PATHS})
endif ()
if (LLVM_FOUND)
@ -16,6 +18,9 @@ if (ENABLE_EMBEDDED_COMPILER)
message(STATUS "LLVM Include Directory: ${LLVM_INCLUDE_DIRS}")
message(STATUS "LLVM Library Directory: ${LLVM_LIBRARY_DIRS}")
message(STATUS "LLVM C++ Compiler: ${LLVM_CXXFLAGS}")
option(LLVM_HAS_RTTI "Enable if LLVM was build with RTTI enabled" ON)
set (USE_EMBEDDED_COMPILER 1)
endif()
endif()

View File

@ -9,6 +9,7 @@
#cmakedefine01 USE_RDKAFKA
#cmakedefine01 USE_CAPNP
#cmakedefine01 USE_EMBEDDED_COMPILER
#cmakedefine01 LLVM_HAS_RTTI
#cmakedefine01 Poco_SQLODBC_FOUND
#cmakedefine01 Poco_DataODBC_FOUND
#cmakedefine01 Poco_MongoDB_FOUND

View File

@ -42,6 +42,8 @@
#pragma GCC diagnostic pop
#if !LLVM_HAS_RTTI
/** HACK
* Allow to link with LLVM that was compiled without RTTI.
* This is the default option when you build LLVM from sources.
@ -58,6 +60,8 @@ __attribute__((__weak__)) int _ZTIN4llvm12MemoryBufferE = 0;
}
#endif
namespace ProfileEvents
{