Consider adding an option to disable the use of __ulock_wait in libc++ #60466
Labels
invalid
Resolved as invalid, i.e. not a bug
libc++
libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
platform:ios
iOS-related issues
platform:macos
Uses of
__ulock_wait
/__ulock_wake
in libc++ have been added to support C++20'sstd::atomic<T>::wait
.https://reviews.llvm.org/D68480
llvm-project/libcxx/src/atomic.cpp
Line 59 in 0ce25b1
https://github.com/llvm/llvm-project/blob/0ce25b12357b24d06cf08cc02719c144d567d5db/libcxx/src/include/apple_availability.h
These APIs are considered private APIs and will result in App Store rejection.
boostorg/atomic
rust-lang/rust
libc++ comes natively on Apple platforms, but some projects, e.g., Chromium, WebRTC, etc., prefer to static link their own libc++ builds.
https://source.chromium.org/chromium/chromium/src/+/a2a378674abbcd56a824df4b779f90a2b5a0fb3e:build/config/c++/c++.gni;l=13
Fortunately, Chromium does not currently use C++20's
std::atomic<T>::wait
, so code using__ublock_wait
is not currently shipped, but this may change in the future.So it would be nice to have an option (macro) to disable the use of
__ulock_wait
on Apple platforms.The text was updated successfully, but these errors were encountered: