xref: /openbsd-src/gnu/llvm/clang/lib/Support/CMakeLists.txt (revision 12c855180aad702bbcca06e0398d774beeafb155)
1*12c85518Srobertset(LLVM_COMMON_DEPENDS_OLD ${LLVM_COMMON_DEPENDS})
2*12c85518Srobert
3*12c85518Srobert# Drop clang-tablegen-targets from LLVM_COMMON_DEPENDS.
4*12c85518Srobert# so that we could use clangSupport within clang-tblgen and other clang
5*12c85518Srobert# component.
6*12c85518Srobertlist(REMOVE_ITEM LLVM_COMMON_DEPENDS clang-tablegen-targets)
7*12c85518Srobert
8*12c85518Srobertset(LLVM_LINK_COMPONENTS
9*12c85518Srobert  Support
10*12c85518Srobert  )
11*12c85518Srobert
12*12c85518Srobertset(clangSupport_sources
13*12c85518Srobert  RISCVVIntrinsicUtils.cpp
14*12c85518Srobert  )
15*12c85518Srobert
16*12c85518Srobertadd_clang_library(clangSupport ${clangSupport_sources})
17*12c85518Srobert
18*12c85518Srobertif (NOT XCODE)
19*12c85518Srobert  add_library(clangSupport_tablegen ALIAS obj.clangSupport)
20*12c85518Srobertelseif (NOT LLVM_LINK_LLVM_DYLIB)
21*12c85518Srobert  add_library(clangSupport_tablegen ALIAS clangSupport)
22*12c85518Srobertelse()
23*12c85518Srobert  # Build a version of the support library that does not link against
24*12c85518Srobert  # libLLVM-*.so, to be used by clang-tblgen. This is so clang-tblgen doesn't
25*12c85518Srobert  # link against libLLVMSupport twice (once statically and once via
26*12c85518Srobert  # libLLVM-*.so).
27*12c85518Srobert  add_llvm_library(clangSupport_tablegen
28*12c85518Srobert    BUILDTREE_ONLY STATIC DISABLE_LLVM_LINK_LLVM_DYLIB
29*12c85518Srobert    ${clangSupport_sources})
30*12c85518Srobertendif()
31*12c85518Srobert
32*12c85518Srobertset(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS_OLD})
33