[PATCH] D41010: [orc][cmake] Check if 8 byte atomics require libatomic for unittest
Simon Dardis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 8 07:57:56 PST 2017
sdardis created this revision.
Herald added subscribers: arichardson, mgorny.
https://reviews.llvm.org/rL319838 introduced SymbolStringPool which uses 8 byte atomics for
reference counters. On systems which do not support such atomics
natively such as MIPS32, explicitly add libatomic as one of the
libraries for SymbolStringPool's unittest.
https://reviews.llvm.org/D41010
Files:
unittests/ExecutionEngine/Orc/CMakeLists.txt
Index: unittests/ExecutionEngine/Orc/CMakeLists.txt
===================================================================
--- unittests/ExecutionEngine/Orc/CMakeLists.txt
+++ unittests/ExecutionEngine/Orc/CMakeLists.txt
@@ -24,4 +24,9 @@
SymbolStringPoolTest.cpp
)
-target_link_libraries(OrcJITTests PRIVATE ${LLVM_PTHREAD_LIB})
+set(ORC_JIT_TEST_LIBS ${LLVM_PTHREAD_LIB})
+if(NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB)
+ set(ORC_JIT_TEST_LIBS ${LLVM_PTHREAD_LIB} atomic)
+endif()
+
+target_link_libraries(OrcJITTests PRIVATE ${ORC_JIT_TEST_LIBS})
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41010.126155.patch
Type: text/x-patch
Size: 548 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171208/a60ca7f7/attachment.bin>
More information about the llvm-commits
mailing list