Fix flag apply order for builds.

Apply -w flag to build before flags from properties.json are applied to allow overriding that setting. It's not always possible to fix upstream warnings, so the option to disable is useful.