From 2d56ff135e6e0f3cdf455797a6561796a8c1b7b4 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Mon, 14 Feb 2022 22:02:35 +0530 Subject: shared module: Allow linking on Android Android requires shared modules that use symbols from other shared modules to be linked before they can be dlopen()ed in the correct order. Not doing so leads to a missing symbol error: https://github.com/android/ndk/issues/201 We need to always allow linking for this. Also add a soname, although it's not confirmed that it's needed, and it doesn't really hurt if it isn't needed. --- mesonbuild/backend/ninjabackend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mesonbuild/backend/ninjabackend.py') diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index f4df789..560fe53 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -2792,7 +2792,7 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485''')) commands += linker.get_std_shared_lib_link_args() # All shared libraries are PIC commands += linker.get_pic_args() - if not isinstance(target, build.SharedModule) or target.backwards_compat_want_soname: + if not isinstance(target, build.SharedModule) or target.force_soname: # Add -Wl,-soname arguments on Linux, -install_name on OS X commands += linker.get_soname_args( self.environment, target.prefix, target.name, target.suffix, -- cgit v1.1