[Lldb-commits] [lldb] [lldb] Allow building using Mingw-w64 on Windows. (PR #150398)
via lldb-commits
lldb-commits at lists.llvm.org
Thu Jul 24 03:09:16 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: None (cvspvr)
<details>
<summary>Changes</summary>
I wasn't able to build lldb using Mingw-w64 on Windows without changing these 3 lines.
Sorry for opening another pull request. I closed the old one because I don't know how to update it to fix the Clang formatting errors.
---
Full diff: https://github.com/llvm/llvm-project/pull/150398.diff
2 Files Affected:
- (modified) lldb/source/Host/windows/MainLoopWindows.cpp (+1)
- (modified) lldb/source/Host/windows/PipeWindows.cpp (+4-2)
``````````diff
diff --git a/lldb/source/Host/windows/MainLoopWindows.cpp b/lldb/source/Host/windows/MainLoopWindows.cpp
index a1de895c0ba98..c1a018238432d 100644
--- a/lldb/source/Host/windows/MainLoopWindows.cpp
+++ b/lldb/source/Host/windows/MainLoopWindows.cpp
@@ -14,6 +14,7 @@
#include "llvm/Config/llvm-config.h"
#include "llvm/Support/WindowsError.h"
#include <algorithm>
+#include <atomic>
#include <cassert>
#include <ctime>
#include <io.h>
diff --git a/lldb/source/Host/windows/PipeWindows.cpp b/lldb/source/Host/windows/PipeWindows.cpp
index 0b495fff69dfa..001396fafde04 100644
--- a/lldb/source/Host/windows/PipeWindows.cpp
+++ b/lldb/source/Host/windows/PipeWindows.cpp
@@ -279,7 +279,8 @@ llvm::Expected<size_t> PipeWindows::Read(void *buf, size_t size,
return Status(failure_error, eErrorTypeWin32).takeError();
DWORD timeout_msec =
- timeout ? ceil<std::chrono::milliseconds>(*timeout).count() : INFINITE;
+ timeout ? std::chrono::ceil<std::chrono::milliseconds>(*timeout).count()
+ : INFINITE;
DWORD wait_result =
::WaitForSingleObject(m_read_overlapped.hEvent, timeout_msec);
if (wait_result != WAIT_OBJECT_0) {
@@ -324,7 +325,8 @@ llvm::Expected<size_t> PipeWindows::Write(const void *buf, size_t size,
return Status(failure_error, eErrorTypeWin32).takeError();
DWORD timeout_msec =
- timeout ? ceil<std::chrono::milliseconds>(*timeout).count() : INFINITE;
+ timeout ? std::chrono::ceil<std::chrono::milliseconds>(*timeout).count()
+ : INFINITE;
DWORD wait_result =
::WaitForSingleObject(m_write_overlapped.hEvent, timeout_msec);
if (wait_result != WAIT_OBJECT_0) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/150398
More information about the lldb-commits
mailing list