[Lldb-commits] [lldb] 41910f7 - [lldb-dap] Fix build failure on Windows. (#125156)
via lldb-commits
lldb-commits at lists.llvm.org
Fri Jan 31 01:48:13 PST 2025
Author: John Harrison
Date: 2025-01-31T09:48:09Z
New Revision: 41910f72638354cfd27cf7c518dde47e9eb9deab
URL: https://github.com/llvm/llvm-project/commit/41910f72638354cfd27cf7c518dde47e9eb9deab
DIFF: https://github.com/llvm/llvm-project/commit/41910f72638354cfd27cf7c518dde47e9eb9deab.diff
LOG: [lldb-dap] Fix build failure on Windows. (#125156)
A previous change is triggering a failure due to SOCKET not being
defined in IOStream.h. Adjusting the Windows includes to correct the
imports and using a more narrow import (winsock2.h vs windows.h).
Also removed a stale comment.
Tested this on an x86_64 wins 11 vm.
This should fix https://lab.llvm.org/buildbot/#/builders/197/builds/1379
and https://lab.llvm.org/buildbot/#/builders/141/builds/5878
Added:
Modified:
lldb/tools/lldb-dap/IOStream.h
Removed:
################################################################################
diff --git a/lldb/tools/lldb-dap/IOStream.h b/lldb/tools/lldb-dap/IOStream.h
index 74889eb2e5a866..c91b2f717893c8 100644
--- a/lldb/tools/lldb-dap/IOStream.h
+++ b/lldb/tools/lldb-dap/IOStream.h
@@ -10,13 +10,8 @@
#define LLDB_TOOLS_LLDB_DAP_IOSTREAM_H
#if defined(_WIN32)
-// We need to #define NOMINMAX in order to skip `min()` and `max()` macro
-// definitions that conflict with other system headers.
-// We also need to #undef GetObject (which is defined to GetObjectW) because
-// the JSON code we use also has methods named `GetObject()` and we conflict
-// against these.
-#define NOMINMAX
-#include <windows.h>
+#include "lldb/Host/windows/windows.h"
+#include <winsock2.h>
#else
typedef int SOCKET;
#endif
More information about the lldb-commits
mailing list