[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
Wed Jul 28 13:47:03 PDT 2021


ldionne added a comment.

In D47606#2881161 <https://reviews.llvm.org/D47606#2881161>, @efriedma wrote:

> In D47606#2880804 <https://reviews.llvm.org/D47606#2880804>, @ldionne wrote:
>
>> On Darwin, we don't ship `libatomic.so` anywhere. It seems like we also don't ship the atomic builtins as part of `<xcode-toolchain>/usr/lib/clang/<version>/lib/darwin/libclang_rt.osx.a`, which is where I would normally expect those (I think?).
>>
>> So IIUC, there would be two bugs here:
>>
>> 1. Clang doesn't automatically add `-latomic` when linking on Linux. Note that GCC behaves the same, so it is possible that I'll find out there's a good reason for it.
>> 2. We should ship the atomic builtins in some form on Darwin, and make sure those are picked up by the driver.
>>
>> Do you agree?
>
> Yes, that sounds right.

Just to circle back on this, it looks like we do ship compiler-rt on Darwin, and we do ship the atomic builtins. It's just that we didn't ship *all* of them because our libraries were a bit outdated. I'll fix that, but I think that's all that needs fixing on Apple platforms at least.


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