Skip to content

Commit 14192d6

Browse files
committed
Auto merge of #23848 - cmr:no-compiler-docs, r=huonw
This saves a bunch of a time and will make distributions smaller, as well as avoiding filling the implementors page with internal garbage. Turn it back on with `--enable-compiler-docs` if you want them. (Crates behind the facade are not documented at all) [breaking-change]
2 parents f002640 + e64b677 commit 14192d6

File tree

3 files changed

+28
-12
lines changed

3 files changed

+28
-12
lines changed

Diff for: configure

+2-1
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,8 @@ VAL_OPTIONS=""
526526
opt valgrind 0 "run tests with valgrind (memcheck by default)"
527527
opt helgrind 0 "run tests with helgrind instead of memcheck"
528528
opt valgrind-rpass 1 "run rpass-valgrind tests with valgrind"
529-
opt docs 1 "build documentation"
529+
opt docs 1 "build standard library documentation"
530+
opt compiler-docs 0 "build compiler documentation"
530531
opt optimize 1 "build optimized rust code"
531532
opt optimize-cxx 1 "build optimized C++ code"
532533
opt optimize-llvm 1 "build optimized LLVM"

Diff for: mk/crates.mk

+22-10
Original file line numberDiff line numberDiff line change
@@ -122,17 +122,29 @@ ONLY_RLIB_rustc_bitflags := 1
122122
# You should not need to edit below this line
123123
################################################################################
124124

125+
# On channels where the only usable crate is std, only build documentation for
126+
# std. This keeps distributions small and doesn't clutter up the API docs with
127+
# confusing internal details from the crates behind the facade.
128+
129+
ifeq ($(CFG_RELEASE_CHANNEL),stable)
130+
DOC_CRATES := std
131+
else
132+
ifeq ($(CFG_RELEASE_CHANNEL),beta)
133+
DOC_CRATES := std
134+
else
125135
DOC_CRATES := $(filter-out rustc, \
126-
$(filter-out rustc_trans, \
127-
$(filter-out rustc_typeck, \
128-
$(filter-out rustc_borrowck, \
129-
$(filter-out rustc_resolve, \
130-
$(filter-out rustc_driver, \
131-
$(filter-out rustc_privacy, \
132-
$(filter-out rustc_lint, \
133-
$(filter-out log, \
134-
$(filter-out getopts, \
135-
$(filter-out syntax, $(CRATES))))))))))))
136+
$(filter-out rustc_trans, \
137+
$(filter-out rustc_typeck, \
138+
$(filter-out rustc_borrowck, \
139+
$(filter-out rustc_resolve, \
140+
$(filter-out rustc_driver, \
141+
$(filter-out rustc_privacy, \
142+
$(filter-out rustc_lint, \
143+
$(filter-out log, \
144+
$(filter-out getopts, \
145+
$(filter-out syntax, $(CRATES))))))))))))
146+
endif
147+
endif
136148
COMPILER_DOC_CRATES := rustc rustc_trans rustc_borrowck rustc_resolve \
137149
rustc_typeck rustc_driver syntax rustc_privacy \
138150
rustc_lint

Diff for: mk/docs.mk

+4-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,10 @@ doc/$(1)/index.html: $$(LIB_DOC_DEP_$(1)) doc/$(1)/
259259
endef
260260

261261
$(foreach crate,$(DOC_CRATES),$(eval $(call DEF_LIB_DOC,$(crate),DOC_TARGETS)))
262-
$(foreach crate,$(COMPILER_DOC_CRATES),$(eval $(call DEF_LIB_DOC,$(crate),COMPILER_DOC_TARGETS)))
262+
263+
ifdef CFG_COMPILER_DOCS
264+
$(foreach crate,$(COMPILER_DOC_CRATES),$(eval $(call DEF_LIB_DOC,$(crate),COMPILER_DOC_TARGETS)))
265+
endif
263266

264267
ifdef CFG_DISABLE_DOCS
265268
$(info cfg: disabling doc build (CFG_DISABLE_DOCS))

0 commit comments

Comments
 (0)