diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py index b0072a49b874..c646e286d4cb 100644 --- a/mesonbuild/envconfig.py +++ b/mesonbuild/envconfig.py @@ -77,6 +77,23 @@ 'tricore' ) +known_systems = ( + 'aix', + 'android', + 'cygwin', + 'darwin', + 'dragonfly', + 'freebsd', + 'gnu', + 'haiku', + 'linux', + 'netbsd', + 'openbsd', + 'os/2', + 'sunos', + 'windows', +) + # It would feel more natural to call this "64_BIT_CPU_FAMILIES", but # python identifiers cannot start with numbers CPU_FAMILIES_64_BIT = [ @@ -302,6 +319,8 @@ def from_literal(cls, raw: T.Dict[str, ElementaryOptionValues]) -> 'MachineInfo' mlog.warning(f'Unknown endian {endian}') system = literal['system'] + if system not in known_systems: + mlog.warning(f'Unknown system {system}, please report this at https://github.com/mesonbuild/meson/issues/new') kernel = literal.get('kernel', None) subsystem = literal.get('subsystem', None)