libopencm3-examples
libopencm3-examples copied to clipboard
Optimise flags
I assume many libopencm3 users are taking rules.mk from these examples.
BTW, is there any reason to not enable LTO by default for libopencm3 itself? An LTO-enabled library can be used for both LTO ond non-LTO builds equally well, it just takes up a bit more space on host computer storage.
I have backported these changes from my current job project, haven't really tested examples themselves.
IIRC; At the time, LTO enabled didn't work for LTO and non-lto builds, if it can be turned on now safely for all (using "fat" lto obs I presume?) I'm all for it.
gdb3 change looks good, no reason not to do that. I've just kinda been ignoring the examples repo, have been hoping to almost wholesale replace it, but that's reaching for too much maybe
I've pulled the gdb3 and cross ref in. For LTO, I'd like to see something done in conjunction with the lib itself, not just something hidden behind a make variable here.
rtti/exceptions are interesting enough, but without a way to turn them on, we're making the rules out to ban portions of c++ without a way back. I think that should get looked at separately from just "optimize flags"