error: use of LTO is disallowed in this variant of ARM Compiler
This error typically indicates that Link-Time Optimization (LTO) is enabled, but the Arm Compiler currently in use does not support LTO.
The immediate solution in Keil µVision / MDK 5 is:
Options for Target → C/C++ (AC6) → disable “Link-Time Optimization”