Commit bd7fa55b authored by Yonghong Song's avatar Yonghong Song

fix build issue for llvm 5.0.1

Fix issue #1502.
A few cmake version checking greater than 5 includes 5.0.1
which results in compilation failure. Change version checking
to explicitly equal to or greater than version 6.
Signed-off-by: default avatarYonghong Song <yhs@fb.com>
parent 4e04c945
......@@ -8,7 +8,7 @@ list(FIND LLVM_AVAILABLE_LIBS "LLVMCoroutines" _llvm_coroutines)
if (${_llvm_coroutines} GREATER -1)
list(APPEND llvm_raw_libs coroutines)
endif()
if (${LLVM_PACKAGE_VERSION} VERSION_GREATER "5")
if (${LLVM_PACKAGE_VERSION} VERSION_EQUAL 6 OR ${LLVM_PACKAGE_VERSION} VERSION_GREATER 6)
list(APPEND llvm_raw_libs bpfasmparser)
list(APPEND llvm_raw_libs bpfdisassembler)
endif()
......
......@@ -29,7 +29,7 @@ set_target_properties(bpf-shared PROPERTIES VERSION ${REVISION_LAST} SOVERSION 0
set_target_properties(bpf-shared PROPERTIES OUTPUT_NAME bpf)
set(bcc_common_sources bpf_common.cc bpf_module.cc exported_files.cc)
if (${LLVM_PACKAGE_VERSION} VERSION_GREATER "5")
if (${LLVM_PACKAGE_VERSION} VERSION_EQUAL 6 OR ${LLVM_PACKAGE_VERSION} VERSION_GREATER 6)
set(bcc_common_sources ${bcc_common_sources} bcc_debug.cc)
endif()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment