Skip to content

Commit

Permalink
update build dependencies profiles documentation
Browse files Browse the repository at this point in the history
This describes the new defaults for build-overrides, and how to make sure backtraces have the usual debug info, when needed.
  • Loading branch information
lqd committed Oct 17, 2022
1 parent 76585f4 commit 79a15d6
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/doc/src/reference/profiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,18 +298,28 @@ The `bench` profile inherits the settings from the [`release`](#release) profile

#### Build Dependencies

All profiles, by default, do not optimize build dependencies (build scripts,
proc macros, and their dependencies). The default settings for build overrides
are:
To compile quickly, all profiles, by default, do not optimize build
dependencies (build scripts, proc macros, and their dependencies), and avoid
computing debug info when a build dependency is not used as a runtime
dependency. The default settings for build overrides are:

```toml
[profile.dev.build-override]
opt-level = 0
codegen-units = 256
debug = false # when possible

[profile.release.build-override]
opt-level = 0
codegen-units = 256
debug = false # when possible
```

However, if errors occur while running build dependencies, turning full debug
info on will improve backtraces and debuggability when needed:

```toml
debug = true
```

Build dependencies otherwise inherit settings from the active profile in use, as
Expand Down

0 comments on commit 79a15d6

Please sign in to comment.