Skip to content

Commit d1e314f

Browse files
jyn514mark-i-m
authored andcommitted
Recommend debug-logging instead of debug
This makes the compiler faster to running without sacrificing too much performance. It still shows logging so contributors aren't confused by `debug!` doing nothing.
1 parent 647d562 commit d1e314f

File tree

1 file changed

+7
-20
lines changed

1 file changed

+7
-20
lines changed

src/building/how-to-build-and-run.md

+7-20
Original file line numberDiff line numberDiff line change
@@ -37,28 +37,15 @@ settings (and possibly others, such as `llvm.ccache`):
3737
assertions = true
3838

3939
[rust]
40-
# Indicates that the build should be configured for debugging Rust. A
41-
# `debug`-enabled compiler and standard library will be somewhat
42-
# slower (due to e.g. checking of debug assertions) but should remain
43-
# usable.
40+
# Whether or not to leave debug! and trace! calls in the rust binary.
41+
# Overrides the `debug-assertions` option, if defined.
4442
#
45-
# Note: If this value is set to `true`, it will affect a number of
46-
# configuration options below as well, if they have been left
47-
# unconfigured in this file.
43+
# Defaults to rust.debug-assertions value
4844
#
49-
# Note: changes to the `debug` setting do *not* affect `optimize`
50-
# above. In theory, a "maximally debuggable" environment would
51-
# set `optimize` to `false` above to assist the introspection
52-
# facilities of debuggers like lldb and gdb. To recreate such an
53-
# environment, explicitly set `optimize` to `false` and `debug`
54-
# to `true`. In practice, everyone leaves `optimize` set to
55-
# `true`, because an unoptimized rustc with debugging
56-
# enabled becomes *unusably slow* (e.g. rust-lang/rust#24840
57-
# reported a 25x slowdown) and bootstrapping the supposed
58-
# "maximally debuggable" environment (notably std) takes
59-
# hours to build.
60-
#
61-
debug = true
45+
# If you see a message from `tracing` saying
46+
# `max_level_info` is enabled and means logging won't be shown,
47+
# set this value to `true`.
48+
debug-logging = true
6249

6350
# Whether to always use incremental compilation when building rustc
6451
incremental = true

0 commit comments

Comments
 (0)