diff --git a/Cargo.toml b/Cargo.toml index fe918784..f40c3a55 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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 } diff --git a/esp-wifi/README.md b/esp-wifi/README.md index 7bfeb811..aeb37ddc 100644 --- a/esp-wifi/README.md +++ b/esp-wifi/README.md @@ -45,8 +45,6 @@ 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` @@ -54,12 +52,6 @@ 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