File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -109,6 +109,22 @@ build_platform() {
109109 fi
110110 # shellcheck disable=SC2086
111111 libtool -static -o " $out_lib " $archives
112+
113+ # DuckDB ships two definitions of ExtensionHelper::LoadAllExtensions: the real
114+ # generated_extension_loader (registers the statically linked extensions) and
115+ # dummy_static_extension_loader (a no-op fallback for builds without static
116+ # extensions). Merging every archive pulls in both, and the linker can resolve
117+ # the no-op one, leaving the extensions unregistered (DuckDB then tries to
118+ # autoload them, which fails on iOS). Drop the dummy so only the real loader
119+ # remains.
120+ if ar -t " $out_lib " | grep -q ' ^dummy_static_extension_loader.cpp.o$' ; then
121+ ar -d " $out_lib " dummy_static_extension_loader.cpp.o
122+ ranlib " $out_lib "
123+ echo " Removed dummy_static_extension_loader from $out_lib "
124+ else
125+ echo " error: dummy_static_extension_loader not found in $out_lib ; verify the loader merge" >&2
126+ exit 1
127+ fi
112128 echo " Merged $( echo " $archives " | wc -l | tr -d ' ' ) archives into $out_lib "
113129}
114130
You can’t perform that action at this time.
0 commit comments