Skip to content

Latest commit

 

History

History
10 lines (9 loc) · 800 Bytes

swiftc.md

File metadata and controls

10 lines (9 loc) · 800 Bytes

swiftc usage examples

swiftc main.swift -O -emit-sil -o main.sil

where -O means optimisation level, could be:
-O - This is the default value, which enables optimizations for speed and size, but disables some checks such as overflow checking and assertions
-Ounchecked - This disables all optimizations and preserves the intermediate representation of the code for debugging purposes. This option also enables overflow checking and assertions
-Onone - This disables all optimizations and preserves the intermediate representation of the code for debugging purposes. This option also enables overflow checking and assertions
-Osize - This optimizes the code for size rather than speed, which may result in slower execution but smaller binary size