[TargetVersion] Only enable on RISC-V and AArch64 (#115991)
[llvm-project.git] / clang-tools-extra / clangd / support / CMakeLists.txt
blobc0be846ebbbf433dc90f36fe1e95ea2320ac910a
1 # clangd/support contains low-level support libraries that do not depend
2 # on clang either programmatically or conceptually.
4 set(LLVM_LINK_COMPONENTS
5   Support
6   )
8 if(CLANG_BUILT_STANDALONE)
9   # needed to get HAVE_CXX_ATOMICS64_WITHOUT_LIB defined
10   include(CheckAtomic)
11 endif()
13 set(CLANGD_ATOMIC_LIB "")
14 if(NOT HAVE_CXX_ATOMICS_WITHOUT_LIB OR NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB)
15   list(APPEND CLANGD_ATOMIC_LIB "atomic")
16 endif()
18 add_clang_library(clangdSupport STATIC
19   Bracket.cpp
20   Cancellation.cpp
21   Context.cpp
22   DirectiveTree.cpp
23   FileCache.cpp
24   Lex.cpp
25   Logger.cpp
26   Markup.cpp
27   MemoryTree.cpp
28   Path.cpp
29   Shutdown.cpp
30   ThreadCrashReporter.cpp
31   Threading.cpp
32   ThreadsafeFS.cpp
33   Token.cpp
34   Trace.cpp
36   LINK_LIBS
37   ${LLVM_PTHREAD_LIB}
38   ${CLANGD_ATOMIC_LIB}
39   )
41 clang_target_link_libraries(clangdSupport
42   PRIVATE
43   clangBasic
44   clangLex
45   )