Skip to content

Commit

Permalink
Merge pull request ClickHouse#35855 from ClickHouse/backport/22.3/35770
Browse files Browse the repository at this point in the history
Backport ClickHouse#35770 to 22.3: Fix enable LLVM for JIT compilation in CMake
  • Loading branch information
kitaisreal authored Apr 4, 2022
2 parents 9049d5b + ea9bca1 commit 5e6a314
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions contrib/llvm-cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
# During cross-compilation in our CI we have to use llvm-tblgen and other building tools
# tools to be build for host architecture and everything else for target architecture (e.g. AArch64)
# Possible workaround is to use llvm-tblgen from some package...
# But lets just enable LLVM for native builds
if (CMAKE_CROSSCOMPILING OR SANITIZE STREQUAL "undefined")
set (ENABLE_EMBEDDED_COMPILER_DEFAULT OFF)
if (APPLE OR NOT ARCH_AMD64 OR SANITIZE STREQUAL "undefined")
set (ENABLE_EMBEDDED_COMPILER_DEFAULT OFF)
else()
set (ENABLE_EMBEDDED_COMPILER_DEFAULT ON)
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)
Expand Down

0 comments on commit 5e6a314

Please sign in to comment.