mirror of
https://github.com/Cisco-Talos/clamav.git
synced 2026-02-05 04:21:30 -05:00
Have to manually link libtinfo (`-ltinfo`) because our FindLLVM didn't add it to the LLVM_LIBRARIES variable for us. See: - https://stackoverflow.com/questions/21477407/llvm-3-5-fails-to-link Have to remove the CXX_STANDARD setting at the top of CMakeLists.txt because of c++90 / c++11 ABI compatibility issues w/ LLVM. See: - https://maleadt.github.io/LLVM.jl/dev/man/troubleshooting/ Rename "llvm/Config/config.h" "llvm/Config/llvm-config.h" because LLVM renamed it in 2.8. Have to link LLVM manually with the test binaries that use the clamav object library instead of libclamav shared library. CMake does not propagate library dependencies from object files. I tested on ubuntu:16.04 with LLVM 3.6 built from source using: ``` /usr/local/bin/cmake .. -D CMAKE_INSTALL_PREFIX=/opt/llvm/3.6 \ -D LLVM_ENABLE_RTTI=ON ``` Then built clamav w/: ``` /usr/local/bin/cmake .. -D CMAKE_INSTALL_PREFIX=`pwd`/install \ -D BYTECODE_RUNTIME="llvm" \ -D LLVM_ROOT_DIR="/opt/llvm/3.6" \ -D LLVM_FIND_VERSION="3.6.0" && make && make install ```
93 KiB
93 KiB