Build: Add optimisation flag build option

Add a TFM wide flag which allows for adding -Og optimisation for Debug
builds. Note that this does not have an impact on assertions which will
still be enabled in Debug builds and will not effect any other command
line flags, it only passes -Og.

This optimisation flag has the following benefits:
- Speeds up code execution
- Vastly reduces code size
- Allows the optimiser to generate more advanced warnings such as
-Wmaybe-uninitialised

The drawback is that optimisations make the code more difficult to step
through although with -Og, given that this flag is designed for
debugging, these should be minimal. The user will still
be able to build without optimisations if desired by overriding this
flag on the command line.

Signed-off-by: Jackson Cooper-Driver <jackson.cooper-driver@arm.com>
Signed-off-by: Anton Komlev <anton.komlev@arm.com>
Change-Id: I45ef790117b1d63e0f4bb21203fdc370e80031d9
3 files changed