[all-commits] [llvm/llvm-project] 3761ad: [libc++] Remove _LIBCPP_ATOMIC_ONLY_USE_BUILTINS (...
Louis Dionne via All-commits
all-commits at lists.llvm.org
Tue Feb 27 14:31:14 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3761ad01e125e3b38ed2d6f40b3cbcbac13611a5
https://github.com/llvm/llvm-project/commit/3761ad01e125e3b38ed2d6f40b3cbcbac13611a5
Author: Louis Dionne <ldionne.2 at gmail.com>
Date: 2024-02-27 (Tue, 27 Feb 2024)
Changed paths:
M libcxx/docs/ReleaseNotes/19.rst
M libcxx/include/__atomic/aliases.h
M libcxx/include/__atomic/cxx_atomic_impl.h
M libcxx/include/__config
Log Message:
-----------
[libc++] Remove _LIBCPP_ATOMIC_ONLY_USE_BUILTINS (#82000)
As discussed in #76647, _LIBCPP_ATOMIC_ONLY_USE_BUILTINS is a
questionable configuration option. It makes our implementation of
std::atomic even more complicated than it already is for a limited
benefit.
Indeed, the original goal of that setting was to decouple libc++ from
libraries like compiler-rt and libatomic in Freestanding mode. We didn't
have a clear understanding of goals and non-goals of Freestanding back
then, but nowadays we do have a better understanding that removing all
dependencies of libc++ in Freestanding is a non-goal. We should still be
able to depend on builtins like those defined in compiler-rt for
implementing our atomic operations in Freestanding. Freestanding means
that there is no underlying operating system, not that there is no
toolchain available.
This patch removes the configuration option. This should have a very
limited fallout since that configuration was only enabled with
-ffreestanding, and libc++ basically doesn't work out of the box on
Freestanding platforms today.
The benefits are a slightly simpler implementation of std::atomic,
getting rid of one of the ABI-incompatible representations of
std::atomic, and clearing the way for proper Freestanding support to
eventually land in the library.
Fixes #81286
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