Skip to content

Commit ff7ba38

Browse files
authored
Merge pull request #518 from ojeda/core-cfgs
rust: core: share `cfg`s with `rustdoc` builds too
2 parents e0a7397 + b7b750e commit ff7ba38

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)