遍查GCC文档,发现了-O0, -O1, -O2, -O3,就是没有发现-Os。
-Os相当于-O2.5。是使用了所有-O2的优化选项,但又不缩减代码尺寸的方法。
详细的说明如下:
Level 2.5 (-Os)
The special optimization level (-Os or size) enables all -O2 optimizations that do not increase code size; it puts the emphasis on size over speed. This includes all second-level optimizations, except for the alignment optimizations. The...
-O0, -O1, -O2, -O3, -Os, GCC优化选项阅读全文