Several threads on stackoverflow (e.g. this one) discuss the different optimization levels (Onone
, O
, Ounchecked
...) when compiling Swift applications.
However, those postings are related to the development on OSX. It seems that those optimizations can be set directly via Xcode or xcrun (xcrun swift -O3
).
I'm wondering how to switch the different optimization levels when using the Swift compiler directly on Linux (Ubuntu 15.10). Currently, I'm building the application just by invoking swift build
as it is shown in the docs, but I found no way no change the optimization level.