pw_presubmit: Extend gn_clang_build
Extends the gn_clang_build presubmit step so it exhaustively covers all
usage of LLVM tooling.
Change-Id: If9006bdaa57d58e9aeaeb8c86b180bef4bc10a84
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/110235
Reviewed-by: Rob Mohr <mohrr@google.com>
Pigweed-Auto-Submit: Armando Montanez <amontanez@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
diff --git a/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py b/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py
index 78b5b9c..3af3933 100755
--- a/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py
+++ b/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py
@@ -76,7 +76,31 @@
# Build presubmit checks
#
def gn_clang_build(ctx: PresubmitContext):
- build_targets = list(_at_all_optimization_levels('host_clang'))
+ """Checks all compile targets that rely on LLVM tooling."""
+ build_targets = [
+ *_at_all_optimization_levels('host_clang'),
+ 'cpp14_compatibility',
+ 'cpp20_compatibility',
+ 'asan',
+ 'tsan',
+ 'ubsan',
+ 'runtime_sanitizers',
+
+ # TODO(b/234876100): msan will not work until the C++ standard library
+ # included in the sysroot has a variant built with msan.
+ ]
+
+ # clang-tidy doesn't run on Windows.
+ if sys.platform != 'win32':
+ build_targets.append('static_analysis')
+
+ # QEMU doesn't run on Windows.
+ if sys.platform != 'win32':
+ # TODO(b/244604080): For the pw::InlineString tests, qemu_clang_debug
+ # and qemu_clang_speed_optimized produce a binary too large for the
+ # QEMU target's 256KB flash. Restore debug and speed optimized
+ # builds when this is fixed.
+ build_targets.append('qemu_clang_size_optimized')
# TODO(b/240982565): SocketStream currently requires Linux.
if sys.platform.startswith('linux'):