Skip to content

Commit b7b750e

Browse files
committed
rust: core: share cfgs with rustdoc builds too
This follows the pattern we used for `alloc` in #517, although it was done for other reasons. Signed-off-by: Miguel Ojeda <[email protected]>
1 parent 43e3c02 commit b7b750e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

rust/Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ else
2828
cargo_quiet=--verbose
2929
endif
3030

31+
core-cfgs = \
32+
--cfg no_fp_fmt_parse
33+
3134
alloc-cfgs = \
3235
--cfg no_global_oom_handling \
3336
--cfg no_rc \
@@ -331,9 +334,10 @@ $(objtree)/rust/kernel.o: $(srctree)/rust/kernel/lib.rs $(objtree)/rust/alloc.o
331334
# Targets that need to expand twice
332335
.SECONDEXPANSION:
333336
$(objtree)/rust/core.o: private skip_clippy = 1
334-
$(objtree)/rust/core.o: private rustc_target_flags = --cfg no_fp_fmt_parse
337+
$(objtree)/rust/core.o: private rustc_target_flags = $(core-cfgs)
335338
$(objtree)/rust/core.o: $$(RUST_LIB_SRC)/core/src/lib.rs FORCE
336339
$(call if_changed_dep,rustc_library)
337340

341+
rustdoc-core: private rustc_target_flags = $(core-cfgs)
338342
rustdoc-core: $$(RUST_LIB_SRC)/core/src/lib.rs FORCE
339343
$(call if_changed,rustdoc)

0 commit comments

Comments
 (0)