Fail build if clang emits any warnings

This inserts a check of clang's output to see if it emitted any warnings
during the compilation. Normally, warnings will cause immediate failure,
but if without -Werror, they won't. In that case, we still want to mark
that something is wrong, so report a failure.

It would be preferable to report a WARNING status, but this doesn't seem
to be supported at the moment: crbug.com/40581344

Bug: 419005149
Change-Id: Ia921c6900326e618b7618b0685529a5c9000cbfc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/build/+/6580258
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Reviewed-by: Ben Pastene <bpastene@chromium.org>
Commit-Queue: Devon Loehr <dloehr@google.com>
3 files changed
tree: 108fc6f4eac1e030d38e291297c341a07fa45702
  1. hook-scripts/
  2. infra/
  3. recipes/
  4. scripts/
  5. .gitattributes
  6. .gitignore
  7. .style.yapf
  8. .vpython3
  9. .yapfignore
  10. codereview.settings
  11. DEPS
  12. LICENSE
  13. OWNERS
  14. PRESUBMIT.py
  15. README.md
README.md

Recipes

If you're here to make a change to ‘recipes’ (the code located in the recipes directory), please take a look at the README for more information pertaining to recipes.

Style

The preferred style is PEP8 with two-space indent. Functions use lowercase_with_underscores, with the exception of the special functions RunSteps and RunTests in recipes. Use yapf (git cl format --no-clang-format) to autoformat new code.