[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251124151837.2184382-5-ojeda@kernel.org>
Date: Mon, 24 Nov 2025 16:18:16 +0100
From: Miguel Ojeda <ojeda@...nel.org>
To: Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>,
Nathan Chancellor <nathan@...nel.org>,
Nicolas Schier <nicolas@...sle.eu>
Cc: Boqun Feng <boqun.feng@...il.com>,
Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <lossin@...nel.org>,
Andreas Hindborg <a.hindborg@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>,
Trevor Gross <tmgross@...ch.edu>,
Danilo Krummrich <dakr@...nel.org>,
rust-for-linux@...r.kernel.org,
linux-kbuild@...r.kernel.org,
linux-kernel@...r.kernel.org,
patches@...ts.linux.dev,
Jesung Yang <y.j3ms.n@...il.com>
Subject: [PATCH v2 04/20] rust: kbuild: support skipping flags in `rustc_test_library`
Crates like `quote` (added later) will need the ability to skip flags
in the `rustc_test_library` command.
Thus add the support for it.
Reviewed-by: Alice Ryhl <aliceryhl@...gle.com>
Reviewed-by: Gary Guo <gary@...yguo.net>
Tested-by: Gary Guo <gary@...yguo.net>
Tested-by: Jesung Yang <y.j3ms.n@...il.com>
Signed-off-by: Miguel Ojeda <ojeda@...nel.org>
---
rust/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/rust/Makefile b/rust/Makefile
index 45ef84513b6c..6fdab341fc48 100644
--- a/rust/Makefile
+++ b/rust/Makefile
@@ -172,8 +172,8 @@ rustdoc-clean: FORCE
quiet_cmd_rustc_test_library = $(RUSTC_OR_CLIPPY_QUIET) TL $<
cmd_rustc_test_library = \
OBJTREE=$(abspath $(objtree)) \
- $(RUSTC_OR_CLIPPY) $(rust_common_flags) \
- @$(objtree)/include/generated/rustc_cfg $(rustc_target_flags) \
+ $(RUSTC_OR_CLIPPY) $(filter-out $(skip_flags),$(rust_common_flags) $(rustc_target_flags)) \
+ @$(objtree)/include/generated/rustc_cfg \
--crate-type $(if $(rustc_test_library_proc),proc-macro,rlib) \
--out-dir $(objtree)/$(obj)/test --cfg testlib \
-L$(objtree)/$(obj)/test \
--
2.52.0
Powered by blists - more mailing lists