Skip to content

Commit 48fc3ec

Browse files
bonzinifreakboy3742
authored 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 <russell@keith-magee.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent 59d3c42 commit 48fc3ec

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
@@ -208,6 +208,8 @@ Meson natively.
208208
| ios-simulator | |
209209
| tvos | Apple tvOS |
210210
| tvos-simulator | |
211+
| visionos | Apple visionOS |
212+
| visionos-simulator | |
211213
| watchos | Apple watchOS |
212214
| watchos-simulator | |
213215

mesonbuild/envconfig.py

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

321321
def is_darwin(self) -> bool:
322322
"""
323-
Machine is Darwin (iOS/tvOS/OS X)?
323+
Machine is Darwin (macOS/iOS/tvOS/visionOS/watchOS)?
324324
"""
325-
return self.system in {'darwin', 'ios', 'tvos'}
325+
return self.system in {'darwin', 'ios', 'tvos', 'visionos', 'watchos'}
326326

327327
def is_android(self) -> bool:
328328
"""

mesonbuild/environment.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,10 @@ def detect_cpu(compilers: CompilersDict) -> str:
487487
'linux': 'linux',
488488
'cygwin': 'nt',
489489
'darwin': 'xnu',
490+
'ios': 'xnu',
491+
'tvos': 'xnu',
492+
'visionos': 'xnu',
493+
'watchos': 'xnu',
490494
'dragonfly': 'dragonfly',
491495
'haiku': 'haiku',
492496
'gnu': 'gnu',

0 commit comments

Comments
 (0)