[PATCH] D69879: [Support] fix mingw-w64 build

liu hui via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 5 22:15:06 PST 2019


lh123 created this revision.
lh123 added reviewers: sammccall, ilya-biryukov.
Herald added subscribers: llvm-commits, usaxena95, mstorsjo, kadircet, hiraditya.
Herald added a project: LLVM.
lh123 edited the summary of this revision.

Mingw-w64 does not define `_beginthreadex_proc_type`, so we should replace it with `unsigned (__stdcall *ThreadFunc)(void *)`.
fix https://github.com/clangd/clangd/issues/188


https://reviews.llvm.org/D69879

Files:
  llvm/lib/Support/Windows/Threading.inc


Index: llvm/lib/Support/Windows/Threading.inc
===================================================================
--- llvm/lib/Support/Windows/Threading.inc
+++ llvm/lib/Support/Windows/Threading.inc
@@ -34,7 +34,7 @@
 }
 
 static void
-llvm_execute_on_thread_impl(_beginthreadex_proc_type ThreadFunc, void *Arg,
+llvm_execute_on_thread_impl(unsigned (__stdcall *ThreadFunc)(void *), void *Arg,
                             llvm::Optional<unsigned> StackSizeInBytes,
                             JoiningPolicy JP) {
   HANDLE hThread = (HANDLE)::_beginthreadex(


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69879.228003.patch
Type: text/x-patch
Size: 562 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191106/fc86a145/attachment.bin>


More information about the llvm-commits mailing list