@@ -30,23 +30,56 @@ settings (and possibly others, such as `llvm.ccache`):
30
30
31
31
``` toml
32
32
[llvm ]
33
- # Enables LLVM assertions, which will check that the LLVM bitcode generated
34
- # by the compiler is internally consistent. These are particularly helpful
35
- # if you edit `codegen`.
33
+ # Indicates whether the LLVM assertions are enabled or not
36
34
assertions = true
37
35
38
36
[rust ]
39
- # This will make your build more parallel; it costs a bit of runtime
40
- # performance perhaps (less inlining) but it's worth it.
37
+ # Indicates that the build should be configured for debugging Rust. A
38
+ # `debug`-enabled compiler and standard library will be somewhat
39
+ # slower (due to e.g. checking of debug assertions) but should remain
40
+ # usable.
41
+ #
42
+ # Note: If this value is set to `true`, it will affect a number of
43
+ # configuration options below as well, if they have been left
44
+ # unconfigured in this file.
45
+ #
46
+ # Note: changes to the `debug` setting do *not* affect `optimize`
47
+ # above. In theory, a "maximally debuggable" environment would
48
+ # set `optimize` to `false` above to assist the introspection
49
+ # facilities of debuggers like lldb and gdb. To recreate such an
50
+ # environment, explicitly set `optimize` to `false` and `debug`
51
+ # to `true`. In practice, everyone leaves `optimize` set to
52
+ # `true`, because an unoptimized rustc with debugging
53
+ # enabled becomes *unusably slow* (e.g. rust-lang/rust#24840
54
+ # reported a 25x slowdown) and bootstrapping the supposed
55
+ # "maximally debuggable" environment (notably libstd) takes
56
+ # hours to build.
57
+ #
58
+ debug = true
59
+
60
+ # Number of codegen units to use for each compiler invocation. A value of 0
61
+ # means "the number of cores on this machine", and 1+ is passed through to the
62
+ # compiler.
41
63
codegen-units = 0
42
64
43
- # This enables full debuginfo and debug assertions. The line debuginfo is also
44
- # enabled by `debuginfo-level = 1`. Full debuginfo is also enabled by
45
- # `debuginfo-level = 2`. Debug assertions can also be enabled with
46
- # `debug-assertions = true`. Note that `debug = true` will make your build
47
- # slower, so you may want to try individually enabling debuginfo and assertions
48
- # or enable only line debuginfo which is basically free.
49
- debug = true
65
+ # Debuginfo level for most of Rust code, corresponds to the `-C debuginfo=N` option of `rustc`.
66
+ # `0` - no debug info
67
+ # `1` - line tables only - sufficient to generate backtraces that include line
68
+ # information and inlined functions, set breakpoints at source code
69
+ # locations, and step through execution in a debugger.
70
+ # `2` - full debug info with variable and type information
71
+ # Can be overridden for specific subsets of Rust code (rustc, std or tools).
72
+ # Debuginfo for tests run with compiletest is not controlled by this option
73
+ # and needs to be enabled separately with `debuginfo-level-tests`.
74
+ #
75
+ # Defaults to 2 if debug is true
76
+ debuginfo-level = 1
77
+
78
+ # Whether to always use incremental compilation when building rustc
79
+ incremental = true
80
+
81
+ # Emits extra output from tests so test failures are debuggable just from logfiles.
82
+ verbose-tests = true
50
83
```
51
84
52
85
If you have already built ` rustc ` , then you may have to execute ` rm -rf build ` for subsequent
0 commit comments