[PATCH 08/11] rust: skip compilation if there are no system emulators

Paolo Bonzini <[email protected]>
Newsgroups org.nongnu.qemu-rust,org.nongnu.qemu-devel
Message-ID <[email protected]>
Otherwise, the Rust crates require the corresponding C code
(e.g. migration/ for rust/migration/) but the dependencies of
that C code, for example the trace files, have not been built.

Signed-off-by: Paolo Bonzini <[email protected]>
---
 rust/meson.build | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/rust/meson.build b/rust/meson.build
index afbeeeb47a7..bacb7879102 100644
--- a/rust/meson.build
+++ b/rust/meson.build
@@ -1,3 +1,9 @@
+if not have_system
+  subdir_done()
+else
+  message('Rust enabled but it is only used by system emulators.')
+endif
+
 subproject('anyhow-1-rs', required: true)
 subproject('bilge-0.2-rs', required: true)
 subproject('bilge-impl-0.2-rs', required: true)
@@ -30,6 +36,7 @@ subdir('qemu-macros')
 
 subdir('common')
 subdir('bits')
+
 subdir('util')
 subdir('bql')
 subdir('migration')
-- 
2.52.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.