Skip to content
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

Updated documentation on profile-overrides #230

Merged
merged 1 commit into from
Mar 4, 2020
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
8 changes: 4 additions & 4 deletions src/unsorted/speed-vs-size.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ override the optimization level of dependencies. You can use that feature to
optimize all dependencies for size while keeping the top crate unoptimized and
debugger friendly.

[`profile-overrides`]: https://doc.rust-lang.org/nightly/cargo/reference/profiles.html#overrides
[`profile-overrides`]: https://doc.rust-lang.org/cargo/reference/profiles.html#overrides

Here's an example:

Expand All @@ -52,7 +52,7 @@ Here's an example:
name = "app"
# ..

[profile.dev.overrides."*"] # +
[profile.dev.package."*"] # +
opt-level = "z" # +
```

Expand Down Expand Up @@ -93,11 +93,11 @@ particular dependency from being optimized. See example below:
# ..

# don't optimize the `cortex-m-rt` crate
[profile.dev.overrides.cortex-m-rt] # +
[profile.dev.package.cortex-m-rt] # +
opt-level = 0 # +

# but do optimize all the other dependencies
[profile.dev.overrides."*"]
[profile.dev.package."*"]
codegen-units = 1 # better optimizations
opt-level = "z"
```
Expand Down