diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2023-04-17 12:46:46 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2023-04-28 23:02:50 +0300 |
commit | c47a9bf56024fc5443d6a1ae11790b796f6ea18a (patch) | |
tree | 871b08adb8f7f68cb6e348c6aab868273c028e6e /mesonbuild/envconfig.py | |
parent | 566fefedc2d408e8b2ed1f754599cf1851f5a295 (diff) | |
download | meson-sysprops.tar.gz |
Add kernel and userland properties to machine objects.sysprops
Diffstat (limited to 'mesonbuild/envconfig.py')
-rw-r--r-- | mesonbuild/envconfig.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py index 50c974bd1..964e352a2 100644 --- a/mesonbuild/envconfig.py +++ b/mesonbuild/envconfig.py @@ -260,6 +260,8 @@ class MachineInfo(HoldableObject): cpu_family: str cpu: str endian: str + kernel: T.Optional[str] + userland: T.Optional[str] def __post_init__(self) -> None: self.is_64_bit: bool = self.cpu_family in CPU_FAMILIES_64_BIT @@ -283,7 +285,11 @@ class MachineInfo(HoldableObject): if endian not in ('little', 'big'): mlog.warning(f'Unknown endian {endian}') - return cls(literal['system'], cpu_family, literal['cpu'], endian) + system = literal['system'] + kernel = literal.get('kernel', None) + userland = literal.get('userland', None) + + return cls(system, cpu_family, literal['cpu'], endian, kernel, userland) def is_windows(self) -> bool: """ |