diff options
| author | Miguel Ojeda <ojeda@kernel.org> | 2025-11-24 18:18:16 +0300 |
|---|---|---|
| committer | Miguel Ojeda <ojeda@kernel.org> | 2025-11-24 19:15:36 +0300 |
| commit | d4e7307b1f3535c19ff6ca24d3e4aec32cebb120 (patch) | |
| tree | 3b498eebad74caa9dc4cf8b4f1842a482faaf0e0 | |
| parent | 7dbe46c0b11dded16cf9c5f85c1a3f260422cee5 (diff) | |
| download | linux-d4e7307b1f3535c19ff6ca24d3e4aec32cebb120.tar.xz | |
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@google.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Tested-by: Gary Guo <gary@garyguo.net>
Tested-by: Jesung Yang <y.j3ms.n@gmail.com>
Link: https://patch.msgid.link/20251124151837.2184382-5-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
| -rw-r--r-- | rust/Makefile | 4 |
1 files 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 \ |
