From 48e32f8a4b85fe342904e0194df69b1ff46c5c45 Mon Sep 17 00:00:00 2001 From: Benjamin Redelings Date: Sat, 30 Dec 2017 10:35:33 -0800 Subject: [PATCH] Add missing for_linux( ) function. --- mesonbuild/mesonlib.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py index f10a1381e..ee47c5a65 100644 --- a/mesonbuild/mesonlib.py +++ b/mesonbuild/mesonlib.py @@ -280,6 +280,18 @@ def for_cygwin(is_cross, env): return env.cross_info.config['host_machine']['system'] == 'cygwin' return False +def for_linux(is_cross, env): + """ + Host machine is linux? + + Note: 'host' is the machine on which compiled binaries will run + """ + if not is_cross: + return is_linux() + elif env.cross_info.has_host(): + return env.cross_info.config['host_machine']['system'] == 'linux' + return False + def for_darwin(is_cross, env): """ Host machine is Darwin (iOS/OS X)?