File tree 5 files changed +17
-10
lines changed
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})
373
373
# Figure out if lldb could use lldb-server. If so, then we'll
374
374
# ensure we build lldb-server when an lldb target is being built.
375
375
if (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 )
377
377
else ()
378
- set (LLDB_CAN_USE_LLDB_SERVER 0 )
378
+ set (LLDB_CAN_USE_LLDB_SERVER OFF )
379
379
endif ()
380
380
381
381
# Figure out if lldb could use debugserver. If so, then we'll
382
382
# 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 )
385
385
else ()
386
- set (LLDB_CAN_USE_DEBUGSERVER 0 )
386
+ set (LLDB_CAN_USE_DEBUGSERVER OFF )
387
387
endif ()
388
388
389
389
if (NOT LLDB_DISABLE_CURSES)
Original file line number Diff line number Diff line change @@ -101,11 +101,18 @@ if(CMAKE_HOST_APPLE)
101
101
lldb_find_system_debugserver(system_debugserver_path)
102
102
message (STATUS "LLDB tests use out-of-tree debugserver: ${system_debugserver_path} " )
103
103
list (APPEND LLDB_TEST_COMMON_ARGS --out-of-tree -debugserver)
104
- else ( )
104
+ elseif ( TARGET debugserver )
105
105
set (debugserver_path ${LLVM_RUNTIME_OUTPUT_INTDIR} /debugserver)
106
106
message (STATUS "LLDB Tests use just-built debugserver: ${debugserver_path} " )
107
107
list (APPEND LLDB_TEST_COMMON_ARGS --server ${debugserver_path} )
108
108
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" )
109
116
endif ()
110
117
endif ()
111
118
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ add_lldb_tool_subdirectory(lldb-instr)
11
11
add_lldb_tool_subdirectory(lldb-vscode)
12
12
13
13
if (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)
16
16
endif ()
17
17
18
18
if (LLDB_CAN_USE_LLDB_SERVER)
Original file line number Diff line number Diff line change @@ -78,6 +78,6 @@ add_subdirectory(tools)
78
78
add_subdirectory (UnwindAssembly)
79
79
add_subdirectory (Utility)
80
80
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)
82
82
add_subdirectory (debugserver)
83
83
endif ()
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ endfunction()
13
13
add_lldb_test_executable(thread_inferior inferior/thread_inferior.cpp)
14
14
add_lldb_test_executable(environment_check inferior/environment_check.cpp)
15
15
16
- if (LLDB_CAN_USE_DEBUGSERVER)
16
+ if (LLDB_CAN_USE_DEBUGSERVER AND LLDB_TOOL_DEBUGSERVER_BUILD )
17
17
if (LLDB_USE_SYSTEM_DEBUGSERVER)
18
18
lldb_find_system_debugserver(debugserver_path)
19
19
else ()
You can’t perform that action at this time.
0 commit comments