Closed Patryk27 closed 2 years ago
Hey, completely missed to also leave a comment here. As you might have noticed, I have already pulled in the toolchain update commit here and in avr-hal
. Thank you again for your persistent compiler work, you are bringing the AVR backend forward a great deal.
For the LTO change, I am unsure. From my experience, a lot of programs do not compile at all without LTO as a lot of libraries aren't annotated with #[inline]
enough. I think even avr-hal
might be an offender of this as it has been used with LTO almost exclusively up to now...
Fair argument about the LTO - I suggested it mostly because people relatively frequently stumble upon that issue on internet (two times on r/rust already, IIRC) and it's peculiarly nasty, since it gives those "oh no, rust avr is broken again" vibes, when it's not even AVR's codegen fault 😓
But yeah, if from your experience disabing LTO makes things even worse, then maybe it's better to keep it enabled and focus on actually fixing the underlying issue :smile:
I agree, the situation is a bit unfortunate...
I do wonder, does the workaround I posted in that issue not work for the cases where you're hitting it?
Hmm, in which issue? 👀
Ah, I see! I haven't checked that one yet, I'll try the next time I face this error.
Lemme close this one, to keep it tidy - I'll re-open in case I find anything :-)
(commit messages contain rationale)