andysworkshop / stm32plus

The C++ library for the STM32 F0, F100, F103, F107 and F4 microcontrollers
http://www.andybrown.me.uk
Other
745 stars 224 forks source link

LTO build option #192

Closed kaidokert closed 8 years ago

kaidokert commented 8 years ago

Another size optimization related to #189 , optionally enabling GCC LTO. Gives around 7-8% average binary size saving on Cortex-M0. Is piled this on top of the previous #190 , but i can separate it too

andysworkshop commented 8 years ago

Added support for cygwin builds but otherwise a very worthwhile addition. Tested OK on Windows/Linux/Mac using arm-none-eabi-gcc 5.2.1

kaidokert commented 8 years ago

Thanks for merging ! Its probably worth adding a travis build config or two to make sure LTO doesnt break due to some weak symbols etc in some cases, it can be somewhat brittle. So far, adding a attribute((used)) has gotten me out of these