Check explicitly for clang++ usage

gcc might also be used on linux instead of clang++ but the
current implementation would still include these clang++ specific
flags which are not supported by gcc.

Change-Id: I1345bff16d9bf07f1c81506fef4749963182f299
Reviewed-by: Brett Wilson <>
Commit-Queue: Brett Wilson <>
diff --git a/build/ b/build/
index 6738f44..ce600e7 100755
--- a/build/
+++ b/build/
@@ -446,8 +446,8 @@
-    # flag not supported by gcc/g++.
-    if not (platform.is_aix() or platform.is_msys() or platform.is_mingw()):
+    # flags not supported by gcc/g++.
+    if cxx == 'clang++':
       cflags.extend(['-Wrange-loop-analysis', '-Wextra-semi-stmt'])
     if platform.is_linux() or platform.is_mingw() or platform.is_msys():