@@ -37,30 +37,32 @@ quiet_cmd_rustdoc = RUSTDOC $(if $(rustdoc_host),H, ) $<
37
37
--output $(objtree ) /rust/doc --crate-name $(subst rustdoc-,,$@ ) \
38
38
@$(objtree ) /include/generated/rustc_cfg $<
39
39
40
- rustdoc : rustdoc-macros rustdoc-compiler_builtins rustdoc-alloc rustdoc-kernel
40
+ rustdoc : rustdoc-core rustdoc- macros rustdoc-compiler_builtins rustdoc-alloc rustdoc-kernel
41
41
42
42
rustdoc-macros : private rustdoc_host = yes
43
43
rustdoc-macros : private rustc_target_flags = --crate-type proc-macro \
44
44
--extern proc_macro
45
45
rustdoc-macros : $(srctree ) /rust/macros/lib.rs FORCE
46
46
$(call if_changed,rustdoc)
47
47
48
- rustdoc-compiler_builtins : $(srctree ) /rust/compiler_builtins.rs FORCE
48
+ rustdoc-compiler_builtins : $(srctree ) /rust/compiler_builtins.rs rustdoc-core FORCE
49
49
$(call if_changed,rustdoc)
50
50
51
51
# We need to allow `broken_intra_doc_links` because some
52
52
# `no_global_oom_handling` functions refer to non-`no_global_oom_handling`
53
53
# functions. Ideally `rustdoc` would have a way to distinguish broken links
54
54
# due to things that are "configured out" vs. entirely non-existing ones.
55
55
rustdoc-alloc : private rustc_target_flags = --cfg no_global_oom_handling \
56
- -Abroken_intra_doc_links
57
- rustdoc-alloc : $(srctree ) /rust/alloc/lib.rs FORCE
56
+ -Abroken_intra_doc_links
57
+ rustdoc-alloc : $(srctree ) /rust/alloc/lib.rs rustdoc-core \
58
+ rustdoc-compiler_builtins FORCE
58
59
$(call if_changed,rustdoc)
59
60
60
61
rustdoc-kernel : private rustc_target_flags = --extern alloc \
61
62
--extern build_error \
62
63
--extern macros=$(objtree)/rust/libmacros.so
63
- rustdoc-kernel : $(srctree ) /rust/kernel/lib.rs rustdoc-macros \
64
+ rustdoc-kernel : $(srctree ) /rust/kernel/lib.rs rustdoc-core \
65
+ rustdoc-macros rustdoc-compiler_builtins rustdoc-alloc \
64
66
$(objtree)/rust/libmacros.so $(objtree)/rust/bindings_generated.rs FORCE
65
67
$(call if_changed,rustdoc)
66
68
@@ -299,3 +301,6 @@ $(objtree)/rust/kernel.o: $(srctree)/rust/kernel/lib.rs $(objtree)/rust/alloc.o
299
301
$(objtree ) /rust/core.o : private skip_clippy = 1
300
302
$(objtree ) /rust/core.o : $$(RUST_LIB_SRC ) /core/src/lib.rs FORCE
301
303
$(call if_changed_dep,rustc_library)
304
+
305
+ rustdoc-core : $$(RUST_LIB_SRC ) /core/src/lib.rs FORCE
306
+ $(call if_changed,rustdoc)
0 commit comments