aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2024-10-03 16:28:45 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2024-10-11 12:32:17 +0200
commit1a6ef6ff624f0e485bf17210ad34d387a953b288 (patch)
treedb9833b532052b095426739692fbc5ab46787227 /meson.build
parent764a6ee9feb428a9759eaa94673285fad2586f11 (diff)
configure, meson: detect Rust toolchain
Include the correct path and arguments to rustc in the native and cross files (native compilation is needed for procedural macros). Based on the host architecture and OS, the compiler and optionally the argument to --cpu, the Rust target triple can be detected automatically for either a native or a cross compiler. In general, it is only a matter of translating the architecture and OS, and adding a machine to form the triple, but there are some special cases (e.g. detecting soft vs. hard floating point on ARM) and some inconsistencies. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org> Link: https://lore.kernel.org/r/207d2640b32d511e9c27478ce3192f5bb0bf3169.1727961605.git.manos.pitsidianakis@linaro.org [Leave disabled by default until CI covers the Rust code on supported distros. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build5
1 files changed, 3 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index 93ddaef500..f76f01f065 100644
--- a/meson.build
+++ b/meson.build
@@ -4325,8 +4325,9 @@ else
endif
summary_info += {'Rust support': have_rust}
if have_rust
- summary_info += {'rustc version': rustc.version()}
- summary_info += {'rustc': ' '.join(rustc.cmd_array())}
+ summary_info += {'rustc version': rustc.version()}
+ summary_info += {'rustc': ' '.join(rustc.cmd_array())}
+ summary_info += {'Rust target': config_host['RUST_TARGET_TRIPLE']}
endif
option_cflags = (get_option('debug') ? ['-g'] : [])
if get_option('optimization') != 'plain'