From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-rust@nongnu.org, berrange@redhat.com,
junjie.mao@hotmail.com, manos.pitsidianakis@linaro.org,
kwolf@redhat.com
Subject: [PATCH 01/12] rust: apply --cfg MESON to all crates
Date: Fri, 15 Nov 2024 17:40:14 +0100 [thread overview]
Message-ID: <20241115164025.1917618-1-pbonzini@redhat.com> (raw)
In-Reply-To: <20241115163944.1917393-1-pbonzini@redhat.com>
We might have more uses for --cfg MESON, even though right now it's only
qemu-api that has generated files. Since we're going to add more flags
to the add_project_arguments calls for Rust, it makes sense to also add
--cfg MESON everywhere.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
meson.build | 7 ++++---
rust/qemu-api/meson.build | 2 +-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index e0b880e4e13..a6172524287 100644
--- a/meson.build
+++ b/meson.build
@@ -3422,10 +3422,11 @@ if have_rust
# is safe; https://github.com/rust-lang/rust/pull/54675 says that
# passing -nodefaultlibs to the linker "was more ideological to
# start with than anything".
- add_project_arguments(rustc_args + ['-C', 'default-linker-libraries'],
+ add_project_arguments(rustc_args +
+ ['--cfg', 'MESON', '-C', 'default-linker-libraries'],
native: false, language: 'rust')
-
- add_project_arguments(rustc_args, native: true, language: 'rust')
+ add_project_arguments(rustc_args + ['--cfg', 'MESON'],
+ native: true, language: 'rust')
endif
hxtool = find_program('scripts/hxtool')
diff --git a/rust/qemu-api/meson.build b/rust/qemu-api/meson.build
index 6f637af7b1b..cad9ac4844e 100644
--- a/rust/qemu-api/meson.build
+++ b/rust/qemu-api/meson.build
@@ -1,4 +1,4 @@
-_qemu_api_cfg = ['--cfg', 'MESON']
+_qemu_api_cfg = []
# _qemu_api_cfg += ['--cfg', 'feature="allocator"']
if rustc.version().version_compare('>=1.77.0')
_qemu_api_cfg += ['--cfg', 'has_offset_of']
--
2.47.0
next parent reply other threads:[~2024-11-15 16:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20241115163944.1917393-1-pbonzini@redhat.com>
2024-11-15 16:40 ` Paolo Bonzini [this message]
2024-11-15 16:40 ` [PATCH 02/12] rust: allow using build-root bindings.rs from cargo Paolo Bonzini
2024-11-15 16:40 ` [PATCH 03/12] rust: build: move rustc_args.py invocation to qemu-api crate Paolo Bonzini
2024-11-15 16:40 ` [PATCH 04/12] rust: build: restrict --cfg generation to only required symbols Paolo Bonzini
2024-11-15 16:40 ` [PATCH 05/12] rust: build: generate lint flags from Cargo.toml Paolo Bonzini
2024-11-15 16:40 ` [PATCH 06/12] rust: cargo: store desired warning levels in workspace Cargo.toml Paolo Bonzini
2024-11-15 16:40 ` [PATCH 07/12] rust: build: move strict lints handling to rustc_args.py Paolo Bonzini
2024-11-15 16:40 ` [PATCH 08/12] rust: fix a couple style issues from clippy Paolo Bonzini
2024-11-15 16:40 ` [PATCH 09/12] rust: build: establish a baseline of lints across all crates Paolo Bonzini
2024-11-15 16:40 ` [PATCH 10/12] rust: build: add "make clippy", "make rustfmt", "make rustdoc" Paolo Bonzini
2024-11-15 16:40 ` [PATCH 11/12] rust: ci: add job that runs Rust tools Paolo Bonzini
2024-11-15 16:40 ` [PATCH 12/12] rust: fix doc test syntax 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=20241115164025.1917618-1-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=berrange@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 \
/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).