[Flang][OpenMP]Add parsing support for DISPATCH construct (#121982)
[llvm-project.git] / lldb / tools / lldb-server / CMakeLists.txt
blob8d6843ec5ddd88744b9cd0db4a856f0618086b9c
1 set(LLVM_TARGET_DEFINITIONS LLGSOptions.td)
2 tablegen(LLVM LLGSOptions.inc -gen-opt-parser-defs)
3 add_public_tablegen_target(LLGSOptionsTableGen)
5 set(LLDB_PLUGINS)
7 if(CMAKE_SYSTEM_NAME MATCHES "Linux|Android")
8   list(APPEND LLDB_PLUGINS lldbPluginProcessLinux)
9 endif()
11 if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
12   list(APPEND LLDB_PLUGINS lldbPluginProcessFreeBSD)
13 endif()
15 if(CMAKE_SYSTEM_NAME MATCHES "NetBSD")
16   list(APPEND LLDB_PLUGINS lldbPluginProcessNetBSD)
17 endif()
19 if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
20   list(APPEND LLDB_PLUGINS lldbPluginObjectFileMachO)
21 elseif(CMAKE_SYSTEM_NAME MATCHES "Windows")
22   list(APPEND LLDB_PLUGINS lldbPluginObjectFilePECOFF)
23 elseif(CMAKE_SYSTEM_NAME MATCHES "AIX")
24   list(APPEND LLDB_PLUGINS lldbPluginObjectFileXCOFF)
25 else()
26   list(APPEND LLDB_PLUGINS lldbPluginObjectFileELF)
27 endif()
29 if(APPLE_EMBEDDED)
30   if(LLDB_CODESIGN_IDENTITY)
31     # Use explicit LLDB identity
32     set(LLVM_CODESIGNING_IDENTITY ${LLDB_CODESIGN_IDENTITY})
33   else()
34     # Use explicit LLVM identity or default to lldb_codesign if empty
35     if(NOT LLVM_CODESIGNING_IDENTITY)
36       set(LLVM_CODESIGNING_IDENTITY lldb_codesign)
37     endif()
38   endif()
39 endif()
41 add_lldb_tool(lldb-server
42     lldb-gdbserver.cpp
43     lldb-platform.cpp
44     lldb-server.cpp
45     LLDBServerUtilities.cpp
46     SystemInitializerLLGS.cpp
48     LINK_LIBS
49       lldbHost
50       lldbInitialization
51       lldbVersion
52       ${LLDB_PLUGINS}
53       lldbPluginInstructionARM
54       lldbPluginInstructionLoongArch
55       lldbPluginInstructionMIPS
56       lldbPluginInstructionMIPS64
57       lldbPluginInstructionRISCV
58       ${LLDB_SYSTEM_LIBS}
60     LINK_COMPONENTS
61       Option
62       Support
65 add_dependencies(lldb-server
66   LLGSOptionsTableGen
67   ${tablegen_deps}
69 target_include_directories(lldb-server PRIVATE "${LLDB_SOURCE_DIR}/source")
70 target_link_libraries(lldb-server PRIVATE ${LLDB_SYSTEM_LIBS})