[PATCH] D47606: [compiler-rt] [builtins] Don't build __atomic_load etc. by default.
Louis Dionne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 15 06:52:37 PDT 2021
ldionne added a comment.
Does this mean that we're never actually including the atomic builtins in any of the Clang releases?
I'm trying to investigate what the state of things is because right now, code like the following doesn't work out-of-the-box on Clang/Linux nor on AppleClang/macOS:
cat <<EOF | clang++ -xc++ -
#include <atomic>
struct Large { int storage[100]; };
std::atomic<Large> x;
int main(int, char**) { return x.is_lock_free(); }
EOF
/tmp/--754274.o: In function `std::atomic<Large>::is_lock_free() const':
-:(.text._ZNKSt6atomicI5LargeE12is_lock_freeEv[_ZNKSt6atomicI5LargeE12is_lock_freeEv]+0x19): undefined reference to `__atomic_is_lock_free'
Furthermore, none of the `libclang_rt.xxx.yyy.so` or `libclang_rt.xxx.yyy.a` libraries shipped alongside Clang appear to contain `__atomic_is_lock_free`. Where is the implementation expected to get it from?
Repository:
rCRT Compiler Runtime
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D47606/new/
https://reviews.llvm.org/D47606
More information about the llvm-commits
mailing list