platformio / platform-atmelsam

Atmel SAM: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/atmelsam
Apache License 2.0
78 stars 105 forks source link

Enable LTO support #181

Closed Yannicked closed 2 years ago

Yannicked commented 2 years ago

Currently, this platform does not play nicely with GCCs Link Time Optimisation (enabled using the -flto flag). Due to the absence of the LTO plugin in binutils' ar. This can be fixed by using the respective arm-none-eabi-gcc-ar variant which is already included in the toolchain-gccarmnoneeabi package

The stm32 platform has already implemented the same enhancement: https://github.com/platformio/platform-ststm32/pull/419

valeros commented 2 years ago

Thanks for the PR, merged.