[all-commits] [llvm/llvm-project] 0f5020: [libc++] Build thread_win32.cpp only if LIBCXX_HAS...

Colin Finck via All-commits all-commits at lists.llvm.org
Tue Feb 16 07:04:16 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0f5020af7f347f029b5687f7a6d3b72174995d59
      https://github.com/llvm/llvm-project/commit/0f5020af7f347f029b5687f7a6d3b72174995d59
  Author: Colin Finck <colin at reactos.org>
  Date:   2021-02-16 (Tue, 16 Feb 2021)

  Changed paths:
    M libcxx/src/CMakeLists.txt

  Log Message:
  -----------
  [libc++] Build thread_win32.cpp only if LIBCXX_HAS_PTHREAD_API is not set

This allows building libc++ against winpthreads from mingw-w64 to support
operating systems older than Windows 7. The remaining libc++ code already
supports `WIN32` with `LIBCXX_HAS_PTHREAD_API`.

Note that there is also the older "pthreads-win32". However, that support
library implements `pthread_t` as a struct, which violates the libc++
assumption that `pthread_t` is always a scalar and can be compared,
ordered, and set to zero.

Differential Revision: https://reviews.llvm.org/D96339




More information about the All-commits mailing list