Skip to content

Commit

Permalink
[dsymutil] Explicitly link against libatomic when necessary
Browse files Browse the repository at this point in the history
In some systems, such as RISC-V, atomic support requires explicit linking
against '-latomic' (see riscvarchive/riscv-gcc#12).

Reviewers: davezarzycki, hhb, beanz, jfb, JDevlieghere
Reviewed By: beanz, JDevlieghere
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69003
  • Loading branch information
gktrk authored and luismarques committed Feb 17, 2020
1 parent 3f148ea commit 09856fe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions llvm/tools/dsymutil/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,7 @@ add_llvm_tool(dsymutil
if(APPLE)
target_link_libraries(dsymutil PRIVATE "-framework CoreFoundation")
endif(APPLE)

if(HAVE_CXX_ATOMICS_WITH_LIB OR HAVE_CXX_ATOMICS64_WITH_LIB)
target_link_libraries(dsymutil PRIVATE atomic)
endif()

0 comments on commit 09856fe

Please sign in to comment.