[PATCH] D138522: [LLVM] [CMake] Use LLVM_ATOMIC_LIB in ADT tests to fix PPC32 build
Sam James via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 22 13:54:38 PST 2022
thesamesam created this revision.
thesamesam added a reviewer: mgorny.
Herald added subscribers: steven.zhang, shchenz.
Herald added a project: All.
thesamesam requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Fixes the following:
/usr/lib/gcc/powerpc-unknown-linux-gnu/11.3.0/../../../../powerpc-unknown-linux-gnu/bin/ld: unittests/ADT/CMakeFiles/ADTTests.dir/StatisticTest.cpp.o: undefined reference to symbol '__atomic_load_8@@LIBATOMIC
_1.0'
/usr/lib/gcc/powerpc-unknown-linux-gnu/11.3.0/../../../../powerpc-unknown-linux-gnu/bin/ld: /usr/lib/gcc/powerpc-unknown-linux-gnu/11.3.0/libatomic.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Thanks-to: Arfrever Frehtes Taifersar Arahesis <Arfrever at Apache.Org>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D138522
Files:
llvm/unittests/ADT/CMakeLists.txt
Index: llvm/unittests/ADT/CMakeLists.txt
===================================================================
--- llvm/unittests/ADT/CMakeLists.txt
+++ llvm/unittests/ADT/CMakeLists.txt
@@ -84,6 +84,10 @@
TypeTraitsTest.cpp
)
-target_link_libraries(ADTTests PRIVATE LLVMTestingSupport)
+target_link_libraries(ADTTests
+ PRIVATE
+ LLVMTestingSupport
+ ${LLVM_ATOMIC_LIB}
+)
add_dependencies(ADTTests intrinsics_gen)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138522.477291.patch
Type: text/x-patch
Size: 428 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221122/d1ea95b2/attachment.bin>
More information about the llvm-commits
mailing list