Skip to contentSkip to conversation

meson: do not descend into *-user if no user-mode emulators built

PATCH In review Paolo Bonzini 2 participants 2 messages Oct 16, 2025 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 meson: do not descend into *-user if no user-mode emulators built

User-mode emulators cannot be built for unsupported host architectures; avoid incorrectly descending into common-user/unknown.

---
 meson.build | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
meson.build +5 -3
index afaefa01722..3facde5b68f 100644
@@ -3935,9 +3935,11 @@ endif
 
 common_user_inc = []
 
-subdir('common-user')
-subdir('bsd-user')
-subdir('linux-user')
+if have_user
+  subdir('common-user')
+  subdir('bsd-user')
+  subdir('linux-user')
+endif
 
 # needed for fuzzing binaries
 subdir('tests/qtest/libqos')
Signature · 1 line
2.51.0
#1 lore raw
Quoted 14 lines · Paolo Bonzini

User-mode emulators cannot be built for unsupported host architectures; avoid incorrectly descending into common-user/unknown.

---
 meson.build | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
meson.build +0 -0
index afaefa01722..3facde5b68f 100644
@@ -3935,9 +3935,11 @@ endif
 

meson.build endif · line 3942

Quoted 10 lines
meson.build +5 -3
 common_user_inc = []
 
-subdir('common-user')
-subdir('bsd-user')
-subdir('linux-user')
+if have_user
+  subdir('common-user')
+  subdir('bsd-user')
+  subdir('linux-user')
+endif

The first lines of meson.buld in each subdir are already doing a check and calling subdir_done() straighaway, so what does this really give us ?

With regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|