Skip to content

Commit

Permalink
Merge pull request NixOS#11825 from hercules-ci/fix-arm-libatomic
Browse files Browse the repository at this point in the history
Fix arm libatomic
  • Loading branch information
Mic92 authored Nov 7, 2024
2 parents 8f553f6 + f4b05cf commit 3ab8534
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
8 changes: 8 additions & 0 deletions build-utils-meson/libatomic/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

# 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
1 change: 1 addition & 0 deletions src/libstore/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ if host_machine.system() == 'windows'
deps_other += [wsock32]
endif

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

boost = dependency(
Expand Down
9 changes: 1 addition & 8 deletions src/libutil/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,9 @@ endforeach

configdata.set('HAVE_DECL_AT_SYMLINK_NOFOLLOW', cxx.has_header_symbol('fcntl.h', 'AT_SYMLINK_NOFOLLOW').to_int())

subdir('build-utils-meson/libatomic')
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 3ab8534

Please sign in to comment.