This commit is contained in:
Nikita Mikhaylov 2022-03-07 23:33:48 +01:00
parent b2345134e3
commit 3b97f5f5c3

View File

@ -1,8 +1,8 @@
#if (APPLE OR NOT ARCH_AMD64 OR SANITIZE STREQUAL "undefined")
# set (ENABLE_EMBEDDED_COMPILER_DEFAULT OFF)
#else()
# set (ENABLE_EMBEDDED_COMPILER_DEFAULT ON)
#endif()
if (CMAKE_CROSSCOMPILING OR SANITIZE STREQUAL "undefined")
set (ENABLE_EMBEDDED_COMPILER_DEFAULT OFF)
else()
set (ENABLE_EMBEDDED_COMPILER_DEFAULT ON)
endif()
option (ENABLE_EMBEDDED_COMPILER "Enable support for 'compile_expressions' option for query execution" ${ENABLE_EMBEDDED_COMPILER_DEFAULT})
if (NOT ENABLE_EMBEDDED_COMPILER)
@ -22,12 +22,6 @@ set (LLVM_LIBRARY_DIRS "${ClickHouse_BINARY_DIR}/contrib/llvm/llvm")
set (REQUIRED_LLVM_LIBRARIES
LLVMExecutionEngine
LLVMRuntimeDyld
LLVMX86CodeGen
LLVMX86Desc
LLVMX86Info
LLVMAArch64CodeGen
LLVMAArch64Desc
LLVMAArch64Info
LLVMAsmPrinter
LLVMDebugInfoDWARF
LLVMGlobalISel
@ -59,6 +53,12 @@ set (REQUIRED_LLVM_LIBRARIES
LLVMDemangle
)
if (ARCH_AMD64)
list(APPEND REQUIRED_LLVM_LIBRARIES LLVMX86Info LLVMX86Desc LLVMX86CodeGen)
elseif (ARCH_AARCH64)
list(APPEND REQUIRED_LLVM_LIBRARIES LLVMAArch64Info LLVMAArch64Desc LLVMAArch64CodeGen)
endif ()
#function(llvm_libs_all REQUIRED_LLVM_LIBRARIES)
# llvm_map_components_to_libnames (result all)
# if (USE_STATIC_LIBRARIES OR NOT "LLVM" IN_LIST result)