Two types of build configurations
debugused for developing the applicationsreleaseto create production ready build.
Debug build
-ggdboption is used to enable debug build.
Release build
-O2 -DNDEBUGis used to enable release bulids.-O#flag is used for optimizations.-O1is for debug level optimization. this is the default value.-O2is for release level optimizations.-O3adds additional optimizations that may or may not perform better than-O2.
Note
-O2is alphabet “O” not “0”.