Change clang extra flags behavior

Move the clang extra flags into the *ClangGlobal*flags variables,
instead of adding them to every clang-based module. This means that
they're only applied when !no_default_compiler_flags, like make.

Change-Id: I43b1378d1d932d9aecfd8724a492d0d7716f7631
diff --git a/cc/clang.go b/cc/clang.go
index 6a01010..5e0302a 100644
--- a/cc/clang.go
+++ b/cc/clang.go
@@ -84,10 +84,6 @@
 		// See http://petereisentraut.blogspot.com/2011/05/ccache-and-clang.html.
 		"-Wno-unused-command-line-argument",
 
-		// Disable -Winconsistent-missing-override until we can clean up the existing
-		// codebase for it.
-		"-Wno-inconsistent-missing-override",
-
 		// Force clang to always output color diagnostics. Ninja will strip the ANSI
 		// color codes if it is not running in a terminal.
 		"-fcolor-diagnostics",
@@ -97,6 +93,12 @@
 		"-std=gnu99",
 	}, " "))
 
+	pctx.StaticVariable("clangExtraCppflags", strings.Join([]string{
+		// Disable -Winconsistent-missing-override until we can clean up the existing
+		// codebase for it.
+		"-Wno-inconsistent-missing-override",
+	}, " "))
+
 	pctx.StaticVariable("clangExtraTargetCflags", strings.Join([]string{
 		"-nostdlibinc",
 	}, " "))