[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC v3 10/32] build-sys: add --with-rust{-target} & basic build inf
From: |
Peter Maydell |
Subject: |
Re: [RFC v3 10/32] build-sys: add --with-rust{-target} & basic build infrastructure |
Date: |
Wed, 8 Sep 2021 15:00:43 +0100 |
On Tue, 7 Sept 2021 at 13:41, <marcandre.lureau@redhat.com> wrote:
>
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> Add the build-sys infrastructure to optionally build Rust code.
> Introduce a top-level workspace, so various sub-projects (libraries,
> executables etc) can be developed together, sharing the dependencies and
> output directory.
>
> If not Tier 1 (aarch64 and x86), all of the host architecture QEMU
> supports should be Tier 2:
> https://doc.rust-lang.org/nightly/rustc/platform-support.html
I don't think this is quite true -- for instance the riscv
TCG backend supports 32-bit, but the riscv 32 bit linux rust
port is down in Tier 3. But the major stuff seems to be in Tier
1 or 2.
> +if with_rust
> + rust_target_triple = get_option('with_rust_target')
> + if meson.is_cross_build()
> + # more default target mappings may be added over time
> + if rust_target_triple == '' and targetos == 'windows'
> + rust_target_triple = host_machine.cpu() + '-pc-windows-gnu'
> + endif
> + if rust_target_triple == ''
> + error('cross-compiling, but no Rust target-triple defined.')
> + endif
> + endif
> +endif
Not a huge fan of this... I think we would be better to always
require the user to specify the rust target triple explicitly.
> diff --git a/.gitignore b/.gitignore
> index eb2553026c..78715bc7c4 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -1,5 +1,6 @@
> /GNUmakefile
> /build/
> +/target/
What's this for ?
> *.pyc
> .sdk
> .stgit-*
thanks
-- PMM
- Re: [RFC v3 04/32] glib-compat: add G_SIZEOF_MEMBER, (continued)
- [RFC v3 05/32] scripts/qapi: add QAPISchemaVisitor.visit_module_end, marcandre . lureau, 2021/09/07
- [RFC v3 06/32] scripts/qapi: add a CABI module, marcandre . lureau, 2021/09/07
- [RFC v3 07/32] scripts/qapi: generate CABI dump for C types, marcandre . lureau, 2021/09/07
- [RFC v3 08/32] tests: build qapi-cabi (C ABI dump), marcandre . lureau, 2021/09/07
- [RFC v3 09/32] build-sys: add i686 cpu target, marcandre . lureau, 2021/09/07
- [RFC v3 10/32] build-sys: add --with-rust{-target} & basic build infrastructure, marcandre . lureau, 2021/09/07
- Re: [RFC v3 10/32] build-sys: add --with-rust{-target} & basic build infrastructure,
Peter Maydell <=
- [RFC v3 11/32] build-sys: add a cargo-wrapper script, marcandre . lureau, 2021/09/07
- [RFC v3 12/32] rust: provide a common crate for QEMU, marcandre . lureau, 2021/09/07
- [RFC v3 13/32] rust: use vendored-sources, marcandre . lureau, 2021/09/07