[PATCH] D136282: [clang] [CMake] Link libclangBasic against libatomic when necessary.
Arfrever Frehtes Taifersar Arahesis via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 20 01:26:09 PDT 2022
Arfrever added inline comments.
================
Comment at: clang/lib/Basic/CMakeLists.txt:114-117
+target_link_libraries(clangBasic
+ PRIVATE
+ ${LLVM_ATOMIC_LIB}
+)
----------------
mgorny wrote:
> Is this the right place? Grepping for `std::atomic`, I see lib/Frontend and a bunch of tools, plus a few places in clang-tools-extra.
`clang-15.0.2:20221005-132622.log` (from https://bugs.gentoo.org/874024) says that this is the place where linking is needed:
```
/usr/bin/powerpc-unknown-linux-gnu-ld: lib/libclangBasic.a(FileManager.cpp.o): undefined reference to symbol '__atomic_load_8@@LIBATOMIC_1.0'
/usr/bin/powerpc-unknown-linux-gnu-ld: /usr/lib/gcc/powerpc-unknown-linux-gnu/11.3.1/libatomic.so.1: error adding symbols: DSO missing from command line
```
There were no reportedly no other errors with missing linking.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136282/new/
https://reviews.llvm.org/D136282
More information about the cfe-commits
mailing list