[PATCH] D147937: fix: Link `atomic` into LLVMOrcJIT on platforms without hardware support for atomics

Lang Hames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 10 21:15:30 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG0beeadf20357: [ORC] Link `atomic` on platforms without hardware support for atomics. (authored by 414owen, committed by lhames).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147937/new/

https://reviews.llvm.org/D147937

Files:
  llvm/lib/ExecutionEngine/Orc/CMakeLists.txt


Index: llvm/lib/ExecutionEngine/Orc/CMakeLists.txt
===================================================================
--- llvm/lib/ExecutionEngine/Orc/CMakeLists.txt
+++ llvm/lib/ExecutionEngine/Orc/CMakeLists.txt
@@ -1,3 +1,7 @@
+if (NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB)
+  set (atomic_lib atomic)
+endif()
+
 if( CMAKE_HOST_UNIX AND HAVE_LIBRT )
   set(rt_lib rt)
 endif()
@@ -53,6 +57,7 @@
   LINK_LIBS
   ${LLVM_PTHREAD_LIB}
   ${rt_lib}
+  ${atomic_lib}
 
   LINK_COMPONENTS
   Core


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147937.512331.patch
Type: text/x-patch
Size: 488 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230411/c7dd3777/attachment.bin>


More information about the llvm-commits mailing list