Skip to content

Commit

Permalink
Remove recommendation against LTO (esp-rs#363)
Browse files Browse the repository at this point in the history
  • Loading branch information
bugadani authored Nov 28, 2023
1 parent b0958f1 commit 858a9a3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
6 changes: 0 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,9 @@ exclude = [
resolver = "2"

[profile.release]
# Explicitly disable LTO which the Xtensa codegen backend has issues
lto = "off"
opt-level = 3
debug = true

[profile.dev]
# Explicitly disable LTO which the Xtensa codegen backend has issues
lto = "off"

[workspace.dependencies]
defmt = "=0.3.5"
esp32c3-hal = { version = "0.13.0", default-features = false }
Expand Down
8 changes: 0 additions & 8 deletions esp-wifi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,13 @@ At time of writing, you will already have the linkall flag if you used `cargo ge

### Optimization Level

Link time optimization is not yet recommended for use, please ensure `lto = "off"` is in your `Cargo.toml` for both release and debug profiles.

It is necessary to build with optimization level 2 or 3 since otherwise it might not even be able to connect or advertise.

To make it work also for your debug builds add this to your `Cargo.toml`

```toml
[profile.dev.package.esp-wifi]
opt-level = 3

[profile.dev]
lto = "off"
[profile.release]
lto = "off"

```

### Xtensa considerations
Expand Down

0 comments on commit 858a9a3

Please sign in to comment.