Skip to content

Commit

Permalink
Explicitly link against libatomic on Linux arm (#7257)
Browse files Browse the repository at this point in the history
* Explicitly link against libatomic on Linux arm

* changelog
  • Loading branch information
fealebenpae authored Jan 15, 2024
1 parent 7805df5 commit 1d68948
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
### Fixed
* Handle `EOPNOTSUPP` when using `posix_fallocate()` and fallback to manually consume space. This should enable android users to open a Realm on restrictive filesystems. ([realm-js #6349](https://github.com/realm/realm-js/issues/6349), more prevalent since v13.23.3 with the change to `REALM_HAVE_POSIX_FALLOCATE` but it was also an issue in some platforms before this)
* Application may crash with `incoming_changesets.size() != 0` when a download message is mistaken for a bootstrap message (PR [#7238](https://github.com/realm/realm-core/pull/7238), since v11.8.0)
* Fixed errors complaining about missing symbols such as `__atomic_is_lock_free` on ARMv7 Linux. (PR [#7257](https://github.com/realm/realm-core/pull/7257))

### Breaking changes
* `App::get_uncached_app(...)` and `App::get_shared_app(...)` have been replaced by `App::get_app(App::CacheMode, ...)`. The App constructor is now enforced to be unusable, use `App::get_app()` instead. ([#7237](https://github.com/realm/realm-core/issues/7237))
Expand Down
4 changes: 4 additions & 0 deletions src/realm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,10 @@ elseif(ANDROID)
target_link_options(Storage INTERFACE LINKER:-gc-sections)
elseif(APPLE)
target_link_options(Storage INTERFACE "SHELL:-framework Foundation")
elseif(LINUX)
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^armv7")
target_link_libraries(Storage INTERFACE atomic)
endif()
endif()

target_link_libraries(Storage INTERFACE Threads::Threads)
Expand Down

0 comments on commit 1d68948

Please sign in to comment.