From 6f510ca695f282c979f62671df6de3de020821f3 Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Mon, 15 Jan 2018 16:09:38 +0000 Subject: Don't version shared libraries for Android Android's loader doesn't handle shared library versioning so this avoids adding a suffix to the filename or soname for Android hosts. --- mesonbuild/mesonlib.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'mesonbuild/mesonlib.py') diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py index a90cb6e..65b689f 100644 --- a/mesonbuild/mesonlib.py +++ b/mesonbuild/mesonlib.py @@ -282,6 +282,9 @@ def is_osx(): def is_linux(): return platform.system().lower() == 'linux' +def is_android(): + return platform.system().lower() == 'android' + def is_haiku(): return platform.system().lower() == 'haiku' @@ -350,6 +353,18 @@ def for_darwin(is_cross, env): return env.cross_info.config['host_machine']['system'] == 'darwin' return False +def for_android(is_cross, env): + """ + Host machine is Android? + + Note: 'host' is the machine on which compiled binaries will run + """ + if not is_cross: + return is_android() + elif env.cross_info.has_host(): + return env.cross_info.config['host_machine']['system'] == 'android' + return False + def for_haiku(is_cross, env): """ Host machine is Haiku? -- cgit v1.1