2017-12-08 08:28:08 +00:00
|
|
|
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error")
|
|
|
|
|
2017-12-09 16:36:03 +00:00
|
|
|
add_library(clickhouse-compiler-lib
|
2017-11-12 12:58:40 +00:00
|
|
|
driver.cpp
|
|
|
|
cc1_main.cpp
|
|
|
|
cc1as_main.cpp
|
|
|
|
lld.cpp)
|
|
|
|
|
2017-12-09 16:36:03 +00:00
|
|
|
target_compile_options(clickhouse-compiler-lib PRIVATE -fno-rtti -fno-exceptions -g0)
|
2017-11-12 12:58:40 +00:00
|
|
|
|
|
|
|
llvm_map_components_to_libraries(REQUIRED_LLVM_LIBRARIES all)
|
|
|
|
|
|
|
|
# We link statically with zlib, and LLVM (sometimes) tries to bring its own dependency.
|
|
|
|
list(REMOVE_ITEM REQUIRED_LLVM_LIBRARIES "-lz")
|
|
|
|
|
2017-12-09 16:36:03 +00:00
|
|
|
target_include_directories(clickhouse-compiler-lib PRIVATE ${LLVM_INCLUDE_DIRS})
|
2017-11-12 16:45:30 +00:00
|
|
|
|
2017-11-12 12:58:40 +00:00
|
|
|
# This is extracted almost directly from CMakeFiles/.../link.txt in LLVM build directory.
|
|
|
|
|
2017-12-09 16:36:03 +00:00
|
|
|
target_link_libraries(clickhouse-compiler-lib
|
2017-11-12 12:58:40 +00:00
|
|
|
|
|
|
|
clangBasic clangCodeGen clangDriver clangFrontend clangFrontendTool
|
|
|
|
clangRewriteFrontend clangARCMigrate clangStaticAnalyzerFrontend
|
|
|
|
clangParse clangSerialization clangSema clangEdit clangStaticAnalyzerCheckers
|
|
|
|
clangASTMatchers clangStaticAnalyzerCore clangAnalysis clangAST clangRewrite clangLex clangBasic
|
|
|
|
|
|
|
|
lldCOFF
|
|
|
|
lldDriver
|
|
|
|
lldELF
|
|
|
|
lldMinGW
|
|
|
|
lldMachO
|
|
|
|
lldReaderWriter
|
|
|
|
lldYAML
|
|
|
|
lldCommon
|
|
|
|
lldCore
|
|
|
|
|
|
|
|
${REQUIRED_LLVM_LIBRARIES}
|
|
|
|
|
2017-12-08 08:28:08 +00:00
|
|
|
#Polly
|
|
|
|
#PollyISL
|
|
|
|
#PollyPPCG
|
2017-11-12 12:58:40 +00:00
|
|
|
|
|
|
|
libtinfo.a
|
|
|
|
common)
|