Skip to content

Commit

Permalink
Merge pull request #11540 from NixOS/meson-arm-atomic
Browse files Browse the repository at this point in the history
nix-util / meson: Add -latomic on arm
  • Loading branch information
edolstra committed Sep 19, 2024
2 parents cd5fc45 + 56b8911 commit 9ea29ea
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/libutil/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ endforeach

subdir('build-utils-meson/threads')

# Check if -latomic is needed
# This is needed for std::atomic on some platforms
# We did not manage to test this reliably on all platforms, so we hardcode
# it for now.
if host_machine.cpu_family() == 'arm'
deps_other += cxx.find_library('atomic')
endif

if host_machine.system() == 'windows'
socket = cxx.find_library('ws2_32')
deps_other += socket
Expand Down

0 comments on commit 9ea29ea

Please sign in to comment.