1.45 -O

Specifies the level of optimization to use when compiling source files.


Where level is one of the following:
Minimum optimization for the performance of the compiled binary. Turns off most optimizations. When debugging is enabled, this option gives the best possible debug view because the structure of the generated code directly corresponds to the source code.
This is the default optimization level.
Restricted optimization. When debugging is enabled, this option gives a generally satisfactory debug view with good code density.
High optimization. When debugging is enabled, the debug view might be less satisfactory because the mapping of object code to source code is not always clear. The compiler might perform optimizations that cannot be described by debug information.
Maximum optimization. When debugging is enabled, this option typically gives a poor debug view. ARM recommends debugging at lower optimization levels.
Enables all the optimizations from -O3 along with other aggressive ​optimizations that might violate strict compliance with language standards, including -ffast-math.
Performs optimizations to reduce code size, balancing code size against code speed.
Performs optimizations to minimize image size.


If you do not specify -Olevel, the compiler assumes -O0.
Non-ConfidentialPDF file icon PDF versionARM DUI0774E
Copyright © 2014-2016 ARM. All rights reserved.