Skip to content

Commit 935bc84

Browse files
Fix Windows build (#137414)
Windows doesn't have domain sockets, so we must properly #ifdef the code that touches DomainSocket. Fixes the windows build break introduced by Commit 488eeb3
1 parent dd05413 commit 935bc84

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lldb/tools/lldb-server/lldb-platform.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,7 @@ int main_platform(int argc, char *argv[]) {
469469
if (gdbserver_port) {
470470
socket = std::make_unique<TCPSocket>(sockfd, /*should_close=*/true);
471471
} else {
472+
#if LLDB_ENABLE_POSIX
472473
llvm::Expected<std::unique_ptr<DomainSocket>> domain_socket =
473474
DomainSocket::FromBoundNativeSocket(sockfd, /*should_close=*/true);
474475
if (!domain_socket) {
@@ -477,6 +478,11 @@ int main_platform(int argc, char *argv[]) {
477478
return socket_error;
478479
}
479480
socket = std::move(domain_socket.get());
481+
#else
482+
WithColor::error() << "lldb-platform child: Unix domain sockets are not "
483+
"supported on this platform.";
484+
return socket_error;
485+
#endif
480486
}
481487

482488
GDBRemoteCommunicationServerPlatform platform(socket->GetSocketProtocol(),

0 commit comments

Comments
 (0)