diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py index ac13a7101..339f98052 100644 --- a/mesonbuild/envconfig.py +++ b/mesonbuild/envconfig.py @@ -292,6 +292,12 @@ class MachineInfo: """Machine is illumos or Solaris?""" return self.system == 'sunos' + def is_hurd(self) -> bool: + """ + Machine is GNU/Hurd? + """ + return self.system == 'gnu' + # Various prefixes and suffixes for import libraries, shared libraries, # static libraries, and executables. # Versioning is added to these names in the backends as-needed. diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py index c72197e7c..6c1e4668b 100644 --- a/mesonbuild/mesonlib.py +++ b/mesonbuild/mesonlib.py @@ -508,6 +508,10 @@ def is_freebsd() -> bool: return platform.system().lower() == 'freebsd' +def is_hurd() -> bool: + return platform.system().lower() == 'gnu' + + def exe_exists(arglist: T.List[str]) -> bool: try: if subprocess.run(arglist, timeout=10).returncode == 0: