diff options
author | Robert Bragg <robert@impossible.com> | 2018-01-15 16:09:38 +0000 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-02-04 00:49:16 +0200 |
commit | 6f510ca695f282c979f62671df6de3de020821f3 (patch) | |
tree | ddb7553e1fc66b134c6c8783cd63982f9d85a8be /mesonbuild/mesonlib.py | |
parent | bfa6c8d0747b4fb355f8e953448385c51574a965 (diff) | |
download | meson-6f510ca695f282c979f62671df6de3de020821f3.zip meson-6f510ca695f282c979f62671df6de3de020821f3.tar.gz meson-6f510ca695f282c979f62671df6de3de020821f3.tar.bz2 |
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.
Diffstat (limited to 'mesonbuild/mesonlib.py')
-rw-r--r-- | mesonbuild/mesonlib.py | 15 |
1 files changed, 15 insertions, 0 deletions
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? |