prusa3d / Prusa-Firmware-MMU

Other
35 stars 19 forks source link

Enable LTO #185

Closed DRracer closed 2 years ago

DRracer commented 2 years ago

shaves off ~10% of the code size which is very nice ... also some RAM, but we are not short on RAM in this case.

I'm not sure if the FW still runs though :wink:

wavexx commented 2 years ago

Hah, love to see that there's actually a cmake shortcut for this instead of having to fiddle with ar..

But that __cxa_pure_virtual? :thinking:

wavexx commented 2 years ago

So I got curious... indeed it's another bug in LTO in 5.4.. using the same on 7.x cxa_virtual is not needed. I updated PR #183 with the fixes for gcc 7.x and LTO with the explicit cmake flag and nothing special is needed. On top of that, I also don't see anymore any call generated to axisUnitToTruncatedUnit call that I was looking at yesterday.. so looks like another optimization win..

DRracer commented 2 years ago

closing in favour of #192