Fix a llvm16 compilation error accepted/tizen_9.0_unified accepted/tizen_unified accepted/tizen_unified_dev tizen_9.0 accepted/tizen/9.0/unified/20241030.235235 accepted/tizen/unified/20240223.064455 accepted/tizen/unified/dev/20240620.010609 tizen_9.0_m2_release
authorYonghong Song <yhs@fb.com>
Thu, 27 Oct 2022 16:05:53 +0000 (09:05 -0700)
committerKarol Lewandowski <k.lewandowsk@samsung.com>
Thu, 22 Feb 2024 14:17:55 +0000 (15:17 +0100)
commit74c6eaf12c5a0d0444ce5052711469a9667f6240
treecaa121cad50992ee902485696610dc9531fedef8
parent7d8bf845341495c12b3f0a7ec952f7877c2ea0ca
Fix a llvm16 compilation error

With latest llvm16, I got the following build errors:
  ...
  /.../bcc/build/src/cc/libbcc.so: undefined reference to
    `llvm::hlsl::FrontendResource::FrontendResource(llvm::GlobalVariable*,
     llvm::StringRef, llvm::hlsl::ResourceKind, unsigned int, unsigned int)'
  collect2: error: ld returned 1 exit status
  make[2]: *** [tests/cc/CMakeFiles/test_libbcc.dir/build.make:371: tests/cc/test_libbcc] Error 1
  ...

The reason is due to llvm upsteam patch https://reviews.llvm.org/D135110
which added llvm library FrontendHLSL as a dependency to clang CodeGen library.
So we need to add it as well for non-shared library build mode.

Signed-off-by: Yonghong Song <yhs@fb.com>
cmake/clang_libs.cmake