Skip to content

ESP32: build_unflags does not remove SDK linker -fno-lto #1862

Closed

Description

@zackees

While validating FastLED/FastLED#4994 through AutoResearch, an ESP32-C6 build using build_flags=-flto=auto and build_unflags=-fno-lto compiles LTO objects but cannot link them: plugin needed to handle lto object, then undefined app_main. The SDK ld_flags still contain -fno-lto. GCC retains plugin-disable behavior even when -flto=auto is appended later (confirmed with the selected GCC 14.2 driver -###). BuildContext filters only user/overlay flags; the ESP32 compiler applies unflags to framework compile flags, but the ESP32 SDK linker flags are never filtered. Plan: first add a focused failing regression, then apply existing unflag filtering before SDK LTO policy and linker construction, validate ESP32 tests and lint, and publish the dependency before the FastLED consumer. Preserve default SDK behavior when no unflags are requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions