Skip to content

Commit 58cb456

Browse files
bonzinifreakboy3742
andcommitted
environment: handle all iOS variants as xnu
All of iOS, tvOS, visionOS, watchOS use the XNU kernel. Report that and also make them return true for is_darwin() which is really more like "is_xnu()". Co-authored-by: Russell Keith-Magee <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 0d93515 commit 58cb456

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

docs/markdown/Reference-tables.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,8 @@ Meson natively.
202202
| ios-simulator | |
203203
| tvos | Apple tvOS |
204204
| tvos-simulator | |
205+
| visionos | Apple visionOS |
206+
| visionos-simulator | |
205207
| watchos | Apple watchOS |
206208
| watchos-simulator | |
207209

mesonbuild/envconfig.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,9 +310,9 @@ def is_linux(self) -> bool:
310310

311311
def is_darwin(self) -> bool:
312312
"""
313-
Machine is Darwin (iOS/tvOS/OS X)?
313+
Machine is Darwin (macOS/iOS/tvOS/visionOS/watchOS)?
314314
"""
315-
return self.system in {'darwin', 'ios', 'tvos'}
315+
return self.system in {'darwin', 'ios', 'tvos', 'visionos', 'watchos'}
316316

317317
def is_android(self) -> bool:
318318
"""

mesonbuild/environment.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,10 @@ def detect_cpu(compilers: CompilersDict) -> str:
447447
'linux': 'linux',
448448
'cygwin': 'nt',
449449
'darwin': 'xnu',
450+
'ios': 'xnu',
451+
'tvos': 'xnu',
452+
'visionos': 'xnu',
453+
'watchos': 'xnu',
450454
'dragonfly': 'dragonfly',
451455
'haiku': 'haiku',
452456
}

0 commit comments

Comments
 (0)