[core] Drop -O2 attribute hack in favor of inline HAL wrappers (will merge inline-micros-esp32 next)

This commit is contained in:
J. Nick Koston
2026-04-24 11:55:14 -05:00
parent be8e677085
commit 47b998d7f5
2 changed files with 2 additions and 4 deletions
+1 -2
View File
@@ -84,8 +84,7 @@ static StaticTask_t loop_task_tcb; // NOLINT(cppcoreguidelines-avoid-non-
static StackType_t
loop_task_stack[ESPHOME_LOOP_TASK_STACK_SIZE]; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
void __attribute__((optimize("O2"))) // NOLINT(clang-diagnostic-unknown-attributes)
loop_task(void *pv_params) {
void loop_task(void *pv_params) {
setup();
while (true) {
App.loop();
+1 -2
View File
@@ -546,8 +546,7 @@ inline ESPHOME_ALWAYS_INLINE Application::ComponentPhaseGuard::ComponentPhaseGua
this->app_.in_loop_ = true;
}
// NOLINTNEXTLINE(clang-diagnostic-unknown-attributes)
inline void ESPHOME_ALWAYS_INLINE __attribute__((optimize("O2"))) Application::loop() {
inline void ESPHOME_ALWAYS_INLINE Application::loop() {
#ifdef USE_RUNTIME_STATS
// Capture the start of the active (non-sleeping) portion of this iteration.
// Used to derive main-loop overhead = active time Σ(component time)