Move common flags to library.