[all-commits] [llvm/llvm-project] cf7d4f: [libc++] Handle threads-related .cpp files like we...

Louis Dionne via All-commits all-commits at lists.llvm.org
Sun Nov 5 16:08:36 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cf7d4f543c73c2707e0c53bae1e7b8419e12b871
      https://github.com/llvm/llvm-project/commit/cf7d4f543c73c2707e0c53bae1e7b8419e12b871
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2023-11-05 (Sun, 05 Nov 2023)

  Changed paths:
    M libcxx/src/CMakeLists.txt
    M libcxx/src/atomic.cpp
    M libcxx/src/barrier.cpp
    A libcxx/src/call_once.cpp
    M libcxx/src/condition_variable.cpp
    M libcxx/src/condition_variable_destructor.cpp
    M libcxx/src/future.cpp
    M libcxx/src/mutex.cpp
    M libcxx/src/mutex_destructor.cpp
    M libcxx/src/shared_mutex.cpp
    M libcxx/src/thread.cpp
    M libcxx/utils/data/ignore_format.txt

  Log Message:
  -----------
  [libc++] Handle threads-related .cpp files like we do all other source files (#71100)

Source files in libc++ are added to the CMake targets only if they are
required by the configuration. We do this pretty consistently for all
configurations like no-filesystem, no-random-device, etc. but we didn't
do it for no-threads. This patch makes this consistent for no-threads,
which is helpful in reducing the amount of work required to port libc++
to some platforms without threads.

Indeed, with the previous approach, several threads-related source files
would end up including headers that might fail to compile properly on
some platforms. This issue is sidestepped entirely by making the
approach for no-threads consistent with the other configurations.




More information about the All-commits mailing list