Reputation: 29
May I know what is the difference between O1 and Os? I only the firmware size compiled by Os is smaller than O1. However, what is the different in performance wise? Would it has much different?
Upvotes: 0
Views: 443
Reputation: 215241
You can read about GCC's different optimization levels in the manual. In particular, -O1
tries to reduce code size and execution time, without performing any optimizations that take a great deal of compilation time.
On the other hand, -Os
means:
Optimize for size. -Os enables all -O2 optimizations except those that often increase code size
Upvotes: 1