summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-04-15 10:18:42 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2025-04-16 12:17:25 +0300
commit48fc3ec8fa25c0cb001603f025ab516e8f0df1e2 (patch)
tree9e66d96908bae17cee7dadcd89bd8c2968838c50
parent59d3c427f53e87df2d10e8e314f1789fc9d6ddfb (diff)
downloadmeson-48fc3ec8fa25c0cb001603f025ab516e8f0df1e2.tar.gz
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>
-rw-r--r--docs/markdown/Reference-tables.md2
-rw-r--r--mesonbuild/envconfig.py4
-rw-r--r--mesonbuild/environment.py4
3 files changed, 8 insertions, 2 deletions
diff --git a/docs/markdown/Reference-tables.md b/docs/markdown/Reference-tables.md
index 1c5f9a33a..a5d27858e 100644
--- a/docs/markdown/Reference-tables.md
+++ b/docs/markdown/Reference-tables.md
@@ -208,6 +208,8 @@ Meson natively.
| ios-simulator | |
| tvos | Apple tvOS |
| tvos-simulator | |
+| visionos | Apple visionOS |
+| visionos-simulator | |
| watchos | Apple watchOS |
| watchos-simulator | |
diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
index c877a7c5a..43fad0cd2 100644
--- a/mesonbuild/envconfig.py
+++ b/mesonbuild/envconfig.py
@@ -320,9 +320,9 @@ class MachineInfo(HoldableObject):
def is_darwin(self) -> bool:
"""
- Machine is Darwin (iOS/tvOS/OS X)?
+ Machine is Darwin (macOS/iOS/tvOS/visionOS/watchOS)?
"""
- return self.system in {'darwin', 'ios', 'tvos'}
+ return self.system in {'darwin', 'ios', 'tvos', 'visionos', 'watchos'}
def is_android(self) -> bool:
"""
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index a0d98ae58..f322cda95 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -487,6 +487,10 @@ KERNEL_MAPPINGS: T.Mapping[str, str] = {'freebsd': 'freebsd',
'linux': 'linux',
'cygwin': 'nt',
'darwin': 'xnu',
+ 'ios': 'xnu',
+ 'tvos': 'xnu',
+ 'visionos': 'xnu',
+ 'watchos': 'xnu',
'dragonfly': 'dragonfly',
'haiku': 'haiku',
'gnu': 'gnu',