Author: Emre Kultursay
Date: 2025-04-25T16:14:18-07:00
New Revision: 935bc84158e933239047de69b9edc77969b5c70c

URL: 
https://github.com/llvm/llvm-project/commit/935bc84158e933239047de69b9edc77969b5c70c
DIFF: 
https://github.com/llvm/llvm-project/commit/935bc84158e933239047de69b9edc77969b5c70c.diff

LOG: 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
https://github.com/llvm/llvm-project/commit/488eeb3ae508221f8e476bbc9d2e9f014542862e

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/lldb/tools/lldb-server/lldb-platform.cpp 
b/lldb/tools/lldb-server/lldb-platform.cpp
index b9a85370d649c..10d79c63af994 100644
--- a/lldb/tools/lldb-server/lldb-platform.cpp
+++ b/lldb/tools/lldb-server/lldb-platform.cpp
@@ -469,6 +469,7 @@ int main_platform(int argc, char *argv[]) {
     if (gdbserver_port) {
       socket = std::make_unique<TCPSocket>(sockfd, /*should_close=*/true);
     } else {
+#if LLDB_ENABLE_POSIX
       llvm::Expected<std::unique_ptr<DomainSocket>> domain_socket =
           DomainSocket::FromBoundNativeSocket(sockfd, /*should_close=*/true);
       if (!domain_socket) {
@@ -477,6 +478,11 @@ int main_platform(int argc, char *argv[]) {
         return socket_error;
       }
       socket = std::move(domain_socket.get());
+#else
+      WithColor::error() << "lldb-platform child: Unix domain sockets are not "
+                            "supported on this platform.";
+      return socket_error;
+#endif
     }
 
     GDBRemoteCommunicationServerPlatform platform(socket->GetSocketProtocol(),


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to