Merge changes If56ed0ab,I632236a1 into integration

* changes:
  perf(build): don't check the compiler's flags for every target
  perf(build): be clever about uppercasing