Added rudimentary support for the --arch= option and moved build type flag generation to a common place.