File tree Expand file tree Collapse file tree 5 files changed +17
-10
lines changed Expand file tree Collapse file tree 5 files changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -373,17 +373,17 @@ list(APPEND system_libs ${CMAKE_DL_LIBS})
373373# Figure out if lldb could use lldb-server. If so, then we'll
374374# ensure we build lldb-server when an lldb target is being built.
375375if (CMAKE_SYSTEM_NAME MATCHES "Android|Darwin|FreeBSD|Linux|NetBSD" )
376- set (LLDB_CAN_USE_LLDB_SERVER 1 )
376+ set (LLDB_CAN_USE_LLDB_SERVER ON )
377377else ()
378- set (LLDB_CAN_USE_LLDB_SERVER 0 )
378+ set (LLDB_CAN_USE_LLDB_SERVER OFF )
379379endif ()
380380
381381# Figure out if lldb could use debugserver. If so, then we'll
382382# ensure we build debugserver when we build lldb.
383- if ( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
384- set (LLDB_CAN_USE_DEBUGSERVER 1 )
383+ if (CMAKE_SYSTEM_NAME MATCHES "Darwin" )
384+ set (LLDB_CAN_USE_DEBUGSERVER ON )
385385else ()
386- set (LLDB_CAN_USE_DEBUGSERVER 0 )
386+ set (LLDB_CAN_USE_DEBUGSERVER OFF )
387387endif ()
388388
389389if (NOT LLDB_DISABLE_CURSES)
Original file line number Diff line number Diff line change @@ -101,11 +101,18 @@ if(CMAKE_HOST_APPLE)
101101 lldb_find_system_debugserver(system_debugserver_path)
102102 message (STATUS "LLDB tests use out-of-tree debugserver: ${system_debugserver_path} " )
103103 list (APPEND LLDB_TEST_COMMON_ARGS --out-of-tree -debugserver)
104- else ( )
104+ elseif ( TARGET debugserver )
105105 set (debugserver_path ${LLVM_RUNTIME_OUTPUT_INTDIR} /debugserver)
106106 message (STATUS "LLDB Tests use just-built debugserver: ${debugserver_path} " )
107107 list (APPEND LLDB_TEST_COMMON_ARGS --server ${debugserver_path} )
108108 add_dependencies (lldb-test -deps debugserver)
109+ elseif (TARGET lldb-server)
110+ set (lldb_server_path ${LLVM_RUNTIME_OUTPUT_INTDIR} /lldb-server)
111+ message (STATUS "LLDB Tests use just-built lldb-server: ${lldb_server_path} " )
112+ list (APPEND LLDB_TEST_COMMON_ARGS --server ${lldb_server_path} )
113+ add_dependencies (lldb-test -deps lldb-server)
114+ else ()
115+ message (WARNING "LLDB Tests enabled, but no server available" )
109116 endif ()
110117endif ()
111118
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ add_lldb_tool_subdirectory(lldb-instr)
1111add_lldb_tool_subdirectory(lldb-vscode)
1212
1313if (CMAKE_SYSTEM_NAME MATCHES "Darwin" )
14- add_subdirectory (darwin-debug)
15- add_subdirectory (debugserver)
14+ add_lldb_tool_subdirectory (darwin-debug)
15+ add_lldb_tool_subdirectory (debugserver)
1616endif ()
1717
1818if (LLDB_CAN_USE_LLDB_SERVER)
Original file line number Diff line number Diff line change @@ -78,6 +78,6 @@ add_subdirectory(tools)
7878add_subdirectory (UnwindAssembly)
7979add_subdirectory (Utility)
8080
81- if (LLDB_CAN_USE_DEBUGSERVER AND NOT LLDB_USE_SYSTEM_DEBUGSERVER)
81+ if (LLDB_CAN_USE_DEBUGSERVER AND LLDB_TOOL_DEBUGSERVER_BUILD AND NOT LLDB_USE_SYSTEM_DEBUGSERVER)
8282 add_subdirectory (debugserver)
8383endif ()
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ endfunction()
1313add_lldb_test_executable(thread_inferior inferior/thread_inferior.cpp)
1414add_lldb_test_executable(environment_check inferior/environment_check.cpp)
1515
16- if (LLDB_CAN_USE_DEBUGSERVER)
16+ if (LLDB_CAN_USE_DEBUGSERVER AND LLDB_TOOL_DEBUGSERVER_BUILD )
1717 if (LLDB_USE_SYSTEM_DEBUGSERVER)
1818 lldb_find_system_debugserver(debugserver_path)
1919 else ()
You can’t perform that action at this time.
0 commit comments