Recognize Hurd as platform/OS

pull/6945/head
Pino Toscano 5 years ago committed by Dylan Baker
parent 97a72a1c53
commit a441836773
  1. 6
      mesonbuild/envconfig.py
  2. 4
      mesonbuild/mesonlib.py

@ -292,6 +292,12 @@ class MachineInfo:
"""Machine is illumos or Solaris?""" """Machine is illumos or Solaris?"""
return self.system == 'sunos' 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, # Various prefixes and suffixes for import libraries, shared libraries,
# static libraries, and executables. # static libraries, and executables.
# Versioning is added to these names in the backends as-needed. # Versioning is added to these names in the backends as-needed.

@ -508,6 +508,10 @@ def is_freebsd() -> bool:
return platform.system().lower() == 'freebsd' return platform.system().lower() == 'freebsd'
def is_hurd() -> bool:
return platform.system().lower() == 'gnu'
def exe_exists(arglist: T.List[str]) -> bool: def exe_exists(arglist: T.List[str]) -> bool:
try: try:
if subprocess.run(arglist, timeout=10).returncode == 0: if subprocess.run(arglist, timeout=10).returncode == 0:

Loading…
Cancel
Save