Skip to content

Commit

Permalink
Backport ClickHouse#35770 to 22.3: Fix enable LLVM for JIT compilatio…
Browse files Browse the repository at this point in the history
…n in CMake
  • Loading branch information
robot-clickhouse committed Apr 1, 2022
1 parent 9a38aef commit ea9bca1
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 ea9bca1

Please sign in to comment.