| 1 |
set(LLVM_COMMON_DEPENDS_OLD ${LLVM_COMMON_DEPENDS}) |
| 2 |
|
| 3 |
# Drop clang-tablegen-targets from LLVM_COMMON_DEPENDS. |
| 4 |
# so that we could use clangSupport within clang-tblgen and other clang |
| 5 |
# component. |
| 6 |
list(REMOVE_ITEM LLVM_COMMON_DEPENDS clang-tablegen-targets) |
| 7 |
|
| 8 |
set(LLVM_LINK_COMPONENTS |
| 9 |
Support |
| 10 |
) |
| 11 |
|
| 12 |
set(clangSupport_sources |
| 13 |
RISCVVIntrinsicUtils.cpp |
| 14 |
) |
| 15 |
|
| 16 |
add_clang_library(clangSupport ${clangSupport_sources}) |
| 17 |
|
| 18 |
if (NOT XCODE) |
| 19 |
add_library(clangSupport_tablegen ALIAS obj.clangSupport) |
| 20 |
elseif (NOT LLVM_LINK_LLVM_DYLIB) |
| 21 |
add_library(clangSupport_tablegen ALIAS clangSupport) |
| 22 |
else() |
| 23 |
# Build a version of the support library that does not link against |
| 24 |
# libLLVM-*.so, to be used by clang-tblgen. This is so clang-tblgen doesn't |
| 25 |
# link against libLLVMSupport twice (once statically and once via |
| 26 |
# libLLVM-*.so). |
| 27 |
add_llvm_library(clangSupport_tablegen |
| 28 |
BUILDTREE_ONLY STATIC DISABLE_LLVM_LINK_LLVM_DYLIB |
| 29 |
${clangSupport_sources}) |
| 30 |
endif() |
| 31 |
|
| 32 |
set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS_OLD}) |