From: Yonghong Song Date: Thu, 17 Feb 2022 17:22:40 +0000 (-0800) Subject: add WindowsDriver to llvm_raw_libs X-Git-Tag: accepted/tizen/unified/20230703.093324~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F29%2F294729%2F1;p=platform%2Fupstream%2Fbcc.git 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::Optional, llvm::Optional, std::__cxx11::basic_string, std::allocator >&, std::__cxx11::basic_string, std::allocator >&)' /home/yhs/work/bcc/build/src/cc/libbcc.so: undefined reference to `llvm::useUniversalCRT(llvm::ToolsetLayout, std::__cxx11::basic_string, std::allocator > const&, llvm::Triple::ArchType, llvm::vfs::FileSystem&)' ... Add this library explicitly for llvm >= 15 and Compilation succeeded. Change-Id: If3f65f14ea316ace356ff15c1160ef61ccfd4171 Origin: upstream, https://github.com/iovisor/bcc/commit/a9fc750f95de89bba70d9637e787c966897d7523 Signed-off-by: Yonghong Song Signed-off-by: Ɓukasz Stelmach --- 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()