Skip to content

rust: core: share cfgs with rustdoc builds too #518

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 14, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion rust/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ else
cargo_quiet=--verbose
endif

core-cfgs = \
--cfg no_fp_fmt_parse

alloc-cfgs = \
--cfg no_global_oom_handling \
--cfg no_rc \
Expand Down Expand Up @@ -331,9 +334,10 @@ $(objtree)/rust/kernel.o: $(srctree)/rust/kernel/lib.rs $(objtree)/rust/alloc.o
# Targets that need to expand twice
.SECONDEXPANSION:
$(objtree)/rust/core.o: private skip_clippy = 1
$(objtree)/rust/core.o: private rustc_target_flags = --cfg no_fp_fmt_parse
$(objtree)/rust/core.o: private rustc_target_flags = $(core-cfgs)
$(objtree)/rust/core.o: $$(RUST_LIB_SRC)/core/src/lib.rs FORCE
$(call if_changed_dep,rustc_library)

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