From: Paolo Bonzini <pbonzini@redhat.com>
To: Junjie Mao <junjie.mao@hotmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org>,
"Wolf, Kevin" <kwolf@redhat.com>, Zhao Liu <zhao1.liu@intel.com>,
qemu-rust@nongnu.org
Subject: Re: [RFC PATCH 01/11] rust: qemu_api: do not disable lints outside bindgen-generated code
Date: Tue, 12 Nov 2024 19:47:43 +0100 [thread overview]
Message-ID: <6e1fce37-4a22-4f36-9798-a424e4ba43d4@redhat.com> (raw)
In-Reply-To: <SY0P300MB10263A5B33FAAEDCB04CDCD295592@SY0P300MB1026.AUSP300.PROD.OUTLOOK.COM>
On 11/12/24 11:10, Junjie Mao wrote:
> diff --git a/meson.build b/meson.build
> index 1239f5c48c..8cea09ffe1 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -4,6 +4,7 @@ project('qemu', ['c'], meson_version: '>=1.5.0',
> version: files('VERSION'))
>
> meson.add_devenv({ 'MESON_BUILD_ROOT' : meson.project_build_root() })
> +meson.add_devenv({ 'CARGO_TARGET_DIR' : meson.project_build_root() / 'cargo' })
I think I'd rather avoid using CARGO_TARGET_DIR, in case someone forgets
he/she is in the devenv.
> add_test_setup('quick', exclude_suites: ['slow', 'thorough'], is_default: true)
> add_test_setup('slow', exclude_suites: ['thorough'], env: ['G_TEST_SLOW=1', 'SPEED=slow'])
> @@ -4083,7 +4084,7 @@ if have_rust
> bindings_rs = rust.bindgen(
> input: 'rust/wrapper.h',
> dependencies: common_ss.all_dependencies(),
> - output: 'bindings.rs.inc',
> + output: 'bindings.inc.rs',
Needs a comment, but I guess it's okay.
> - println!("cargo:rustc-env=BINDINGS_RS_INC={}", file);
> + let out_dir = env::var("OUT_DIR").unwrap();
> + let dest_path = format!("{}/bindings.inc.rs", out_dir);
> + copy(&file, Path::new(&dest_path))?;
A symbolic link seems to work too. Thanks for the tip!
Paolo
next prev parent reply other threads:[~2024-11-12 18:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20241108180139.117112-1-pbonzini@redhat.com>
[not found] ` <20241108180139.117112-12-pbonzini@redhat.com>
2024-11-08 18:12 ` [RFC PATCH 11/11] rust: ci: add job that runs Rust tools Daniel P. Berrangé
[not found] ` <20241108180139.117112-3-pbonzini@redhat.com>
2024-11-12 3:02 ` [RFC PATCH 02/11] rust: build: move rustc_args.py invocation to individual crates Junjie Mao
[not found] ` <20241108180139.117112-6-pbonzini@redhat.com>
[not found] ` <SY0P300MB1026324D1571BBD2E001536695592@SY0P300MB1026.AUSP300.PROD.OUTLOOK.COM>
[not found] ` <CABgObfZUURf_QpdtqzmGF567Uk8obxdQ1P_WeVN1Ag=uG+J46A@mail.gmail.com>
2024-11-12 5:40 ` [RFC PATCH 05/11] rust: cargo: store desired warning levels in workspace Cargo.toml Junjie Mao
[not found] ` <20241108180139.117112-2-pbonzini@redhat.com>
[not found] ` <SY0P300MB102699E99096F482F06296EF95592@SY0P300MB1026.AUSP300.PROD.OUTLOOK.COM>
[not found] ` <CABgObfb9ujpoRrNUUqyiAefSfTOWSV-SGmo2YrSoMdfxBeAD9A@mail.gmail.com>
2024-11-12 10:10 ` [RFC PATCH 01/11] rust: qemu_api: do not disable lints outside bindgen-generated code Junjie Mao
2024-11-12 18:47 ` Paolo Bonzini [this message]
2024-11-13 6:46 ` Junjie Mao
2024-11-13 10:41 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6e1fce37-4a22-4f36-9798-a424e4ba43d4@redhat.com \
--to=pbonzini@redhat.com \
--cc=junjie.mao@hotmail.com \
--cc=kwolf@redhat.com \
--cc=manos.pitsidianakis@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-rust@nongnu.org \
--cc=zhao1.liu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).