aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorYonghong Song <yhs@fb.com>2022-02-17 09:22:40 -0800
committeryonghong-song <ys114321@gmail.com>2022-02-17 10:11:21 -0800
commita9fc750f95de89bba70d9637e787c966897d7523 (patch)
treefdf493e5065cb14882c61c86048d77e5fae8c48b /cmake
parent05fdb24ffc6b70ed2761daf37567f80d93590993 (diff)
downloadbcc-a9fc750f95de89bba70d9637e787c966897d7523.tar.gz
add WindowsDriver to llvm_raw_libs
Upstream https://reviews.llvm.org/D118070 added a new llvm raw lib LLVMWindowsDriver and this caused bcc compilation error like below: ... /home/yhs/work/bcc/build/src/cc/libbcc.so: undefined reference to `llvm::getUniversalCRTSdkDir(llvm::vfs::FileSystem&, llvm::Optional<llvm::StringRef>, llvm::Optional<llvm::StringRef>, llvm::Optional<llvm::StringRef>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)' /home/yhs/work/bcc/build/src/cc/libbcc.so: undefined reference to `llvm::useUniversalCRT(llvm::ToolsetLayout, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, llvm::Triple::ArchType, llvm::vfs::FileSystem&)' ... Add this library explicitly for llvm >= 15 and Compilation succeeded. Signed-off-by: Yonghong Song <yhs@fb.com>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/clang_libs.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmake/clang_libs.cmake b/cmake/clang_libs.cmake
index 3f1523b7..f1b1261b 100644
--- a/cmake/clang_libs.cmake
+++ b/cmake/clang_libs.cmake
@@ -22,6 +22,9 @@ if (${LLVM_PACKAGE_VERSION} VERSION_EQUAL 6 OR ${LLVM_PACKAGE_VERSION} VERSION_G
list(APPEND llvm_raw_libs bpfasmparser)
list(APPEND llvm_raw_libs bpfdisassembler)
endif()
+if (${LLVM_PACKAGE_VERSION} VERSION_EQUAL 15 OR ${LLVM_PACKAGE_VERSION} VERSION_GREATER 15)
+ list(APPEND llvm_raw_libs windowsdriver)
+endif()
llvm_map_components_to_libnames(_llvm_libs ${llvm_raw_libs})
llvm_expand_dependencies(llvm_libs ${_llvm_libs})
endif()