Skip to content

Commit

Permalink
Merge #230
Browse files Browse the repository at this point in the history
230: Updated documentation on profile-overrides r=therealprof a=irwineffect

Profile-overrides has now been stabilized (rust-lang/cargo#7591), so the book has been updated to point to the stable documentation.

During stabilization, syntax was changed to use "package" instead of "overrides" (rust-lang/cargo#7504), documentation updated to match.

Co-authored-by: James Irwin <irwineffect@gmail.com>
  • Loading branch information
bors[bot] and irwineffect authored Mar 4, 2020
2 parents 96e40ed + eeb96b8 commit d22a9c4
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit d22a9c4

Please sign in to comment.