samsonov added a comment. Let's use the -Werror approach. We already use it to detect presence of warnings, and I'd rather not hardcode targets. E.g. what if this flag is not supported (produces warning) by your host compiler on x86? http://reviews.llvm.org/D15362