fix llvm15 compilation error 32/294732/1 accepted/tizen_8.0_unified tizen_8.0 tizen_dev accepted/tizen/8.0/unified/20231005.094638 accepted/tizen/unified/20230703.093324 accepted/tizen/unified/dev/20230726.115445 tizen_8.0_m2_release
authorYonghong Song <yhs@fb.com>
Wed, 10 Aug 2022 04:36:57 +0000 (21:36 -0700)
committerŁukasz Stelmach <l.stelmach@samsung.com>
Fri, 23 Jun 2023 20:06:04 +0000 (22:06 +0200)
commita02a4933ee540154a5acf0663954275a34bb8a82
treedffb73ab1ef0c4cded51cd25eccded33d37f1df2
parent04018242bcd654f9e4beaef1c7e14bd72eceb55b
fix llvm15 compilation error

With llvm15, bcc failed the compilation with the following errors:
  [100%] Building CXX object tests/cc/CMakeFiles/test_libbcc.dir/test_shared_table.cc.o
  /home/yhs/work/llvm-project/llvm/build/install/lib/libclangSema.a(SemaRISCVVectorLookup.cpp.o):
    In function `(anonymous namespace)::RISCVIntrinsicManagerImpl::InitIntrinsicList()':
    SemaRISCVVectorLookup.cpp:
    (.text._ZN12_GLOBAL__N_125RISCVIntrinsicManagerImpl17InitIntrinsicListEv+0x14b):
    undefined reference to `clang::RISCV::RVVIntrinsic::computeBuiltinTypes(
      llvm::ArrayRef<clang::RISCV::PrototypeDescriptor>, bool, bool, bool, unsigned int)'
    SemaRISCVVectorLookup.cpp:(.text._ZN12_GLOBAL__N_125RISCVIntrinsicManagerImpl17InitIntrinsicListEv+0x182):
     undefined reference to `clang::RISCV::RVVIntrinsic::computeBuiltinTypes(
     llvm::ArrayRef<clang::RISCV::PrototypeDescriptor>, bool, bool, bool, unsigned int)'
  ...
  make[1]: *** [CMakeFiles/Makefile2:1110: examples/cpp/CMakeFiles/CGroupTest.dir/all] Error 2
  ...
The failure is due to llvm upstream patch https://reviews.llvm.org/D111617
which introduced another dependency on libclangSupport.a for bcc.
To fix the issue, I added libclangSupport in cmake file.

Change-Id: Ib22adc6ed4cea639a42660ce362e22b32bdd4b85
Origin: upstream, https://github.com/iovisor/bcc/commit/c65e6c5ec5b629ef302259731df33b41b0d705ca
Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
CMakeLists.txt
cmake/clang_libs.cmake