|Home > Compiler 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 optimization might result in a significantly larger image.
Restricted optimization. When debugging is enabled, this option selects a good compromise between image size, performance, and quality of debug view.
-O0 for the best trade-off
between debug view, code size, and performance.
3including those optimizations that are 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. The reason is because the
-fltooption is turned on by default at
-Omax, and that option generates files containing bitcode.
-Omaxand have separate compile and link steps, then also include
-Omaxon your armlink command line.
armclang -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