Generic handling of optimziation flags.