Obviously, the option --freedback for armcc doesn't work. But setting -flto to compiler controls or linker controls (or checking the Link-time optimization checkbox) shows this error:
error: use of LTO is disallowed in this variant of ARM Compiler
And that seems strange since this article is dated 2015 - community.arm.com/.../link-time-optimization-in-arm-compiler-6 - and I'm using Keil 5.24.1 two years later.
Is there another way to do it?
Fair enough.