From 6afa88f9ebcaf1e73e30a0a030723a52a41bf324 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Wed, 8 Nov 2023 18:53:09 -0800 Subject: [PATCH] Explicitly instantiate Set in set.cpp `Set` is the single type not implicitly instantiated in `Obj::get_setbase_ptr()`, so it needs to be explicitly instantiated. --- CHANGELOG.md | 1 + src/realm/set.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 888b15012d4..0b59b4211b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ * ([#????](https://github.com/realm/realm-core/issues/????), since v?.?.?) * A crash at a very specific time during a DiscardLocal client reset on a FLX Realm could leave subscriptions in an invalid state ([#7110](https://github.com/realm/realm-core/pull/7110), since v12.3.0). * Fixed an error "Invalid schema change (UPLOAD): cannot process AddColumn instruction for non-existent table" when using automatic client reset with recovery in dev mode to recover schema changes made locally while offline. ([#7042](https://github.com/realm/realm-core/pull/7042) since the server introduced the feature that allows client to redefine the server's schema if the server is in dev mode - fall 2023) +* Fix missing symbol linker error for `Set` when building with Clang and LTO enabled ([#7121](https://github.com/realm/realm-core/pull/7121), since v12.23.3). ### Breaking changes * None. diff --git a/src/realm/set.cpp b/src/realm/set.cpp index d208de64096..20689dfc1f4 100644 --- a/src/realm/set.cpp +++ b/src/realm/set.cpp @@ -404,6 +404,8 @@ void Set::do_clear() m_tree->set_context_flag(false); } +template class Set; + template <> void Set::do_insert(size_t ndx, ObjLink target_link) {