[all-commits] [llvm/llvm-project] ef51e6: [libc++] Handle _LIBCPP_HAS_NO_{THREADS, LOCALIZATI...

Louis Dionne via All-commits all-commits at lists.llvm.org
Mon Jul 15 07:11:45 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ef51e617c43ef4248973f07e0a711f69d85c948c
      https://github.com/llvm/llvm-project/commit/ef51e617c43ef4248973f07e0a711f69d85c948c
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2024-07-15 (Mon, 15 Jul 2024)

  Changed paths:
    M libcxx/docs/ReleaseNotes/19.rst
    M libcxx/include/barrier
    M libcxx/include/future
    M libcxx/include/ios
    M libcxx/include/latch
    M libcxx/include/locale
    M libcxx/include/locale.h
    M libcxx/include/semaphore
    M libcxx/include/shared_mutex
    M libcxx/include/stop_token
    M libcxx/include/thread

  Log Message:
  -----------
  [libc++] Handle _LIBCPP_HAS_NO_{THREADS,LOCALIZATION} consistently with other carve-outs (#98319)

Previously, we would issue an #error when using a header that requires
threading support or localization support in a configuration where that
is disabled. This is unlike what we do for all the other carve outs like
no-filesystem, no-wide-characters or no-random-device. Instead of
issuing an #error, we normally just remove the problematic parts of the
header.

This patch makes the handling of no-localization and no-threads
consistent with the other carve-outs. I dislike the fact that users
won't get an explicit error message when trying to use e.g. ios in a
build that doesn't support localization, but I think it is better to
handle things consistently. Note that besides the consistency argument,
the #error approach doesn't really work anyways since it would break
down if we moved towards assuming the C locale only in the
no-localization mode.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list