The default optimization level for Xcode?

Can anyone confirm the default options that I should use to optimize the compiler. I remember that I changed this while Xcode4 was in a preview to get around the error, but now I can’t remember what it was installed on before (i.e., By default).

Currently I have installed:

Debug: Fastest, Smallest [-Os]
Release: Fastest, Smallest [-Os]

I'm sure it should be: (but wanted to check)

Debug: None [-O0]
Release: Fastest, Smallest [-Os]
+3
source share
3 answers

Yes None -O0.
When optimizing -O1 or higher, the compiler tries to optimize part of the code (loops, swap commands, and others), which makes it difficult to perform step-by-step debugging.

+6
source

, .

+3

Default values ​​in Xcode 8.2.1: Optimization mode Apple LLVM: fastest, smallest [-O] Optimization mode for Swift: fast, optimization of the entire module [-O-whole-module-optmization]

+1
source

All Articles