Only alter compile flags if build type is set.