Skip to content

Commit 4812acb

Browse files
ojedaSasha Levin
authored and
Sasha Levin
committed
kbuild: rust: remove unneeded @rustc_cfg to avoid ICE
commit 50cfe93 upstream. When KUnit tests are enabled, under very big kernel configurations (e.g. `allyesconfig`), we can trigger a `rustdoc` ICE [1]: RUSTDOC TK rust/kernel/lib.rs error: the compiler unexpectedly panicked. this is a bug. The reason is that this build step has a duplicated `@rustc_cfg` argument, which contains the kernel configuration, and thus a lot of arguments. The factor 2 happens to be enough to reach the ICE. Thus remove the unneeded `@rustc_cfg`. By doing so, we clean up the command and workaround the ICE. The ICE has been fixed in the upcoming Rust 1.79 [2]. Cc: [email protected] Fixes: a66d733 ("rust: support running Rust documentation tests as KUnit ones") Link: rust-lang/rust#122722 [1] Link: rust-lang/rust#122840 [2] Reviewed-by: Alice Ryhl <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent d329608 commit 4812acb

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

rust/Makefile

-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ quiet_cmd_rustdoc_test_kernel = RUSTDOC TK $<
173173
mkdir -p $(objtree)/$(obj)/test/doctests/kernel; \
174174
OBJTREE=$(abspath $(objtree)) \
175175
$(RUSTDOC) --test $(rust_flags) \
176-
@$(objtree)/include/generated/rustc_cfg \
177176
-L$(objtree)/$(obj) --extern alloc --extern kernel \
178177
--extern build_error --extern macros \
179178
--extern bindings --extern uapi \

0 commit comments

Comments
 (0)