|Home > armclang Command-line Options > -O|
Specifies the level of optimization to use when compiling source files.
is one of the following:
Minimum optimization for the performance of the compiled binary. Turns off most optimizations. When debugging is enabled, this option generates code that directly corresponds to the source code. Therefore, this might result in a significantly larger image.
This is the default optimization level.
3including those performed with the
-ffp-mode=fastarmclang option. This level also performs other aggressive optimizations that might violate strict compliance with language standards.
fast, together with other aggressive optimizations.
-Omaxautomatically enables the
-fltooption and the generated object files are not suitable for creating static libraries. When
-fltois enabled, you cannot build ROPI or RWPI images.
-fltooption is enabled, which is turned on by default at
-Omax, because this generates files containing bitcode.
-Omaxand have separate compile and link steps, then also include
-Omaxon your armlink command line.
-mexecute-onlyoption. If you use the
-Omaxoptions, then the compiler cannot generate execute-only code and produces a warning.
If you do not specify
-O, the compiler assumes
-O0. For the best debug view, Arm recommends
-O1 rather than
for the best trade-off between image size, performance, and debug.