Merge "Switch host native tests to -Og" into main
diff --git a/cc/test.go b/cc/test.go
index f5bb761..c9351e9 100644
--- a/cc/test.go
+++ b/cc/test.go
@@ -199,7 +199,10 @@
flags.Local.CFlags = append(flags.Local.CFlags, "-DGTEST_HAS_STD_STRING")
if ctx.Host() {
- flags.Local.CFlags = append(flags.Local.CFlags, "-O0", "-g")
+ flags.Local.CFlags = append([]string{"-Og", "-g"}, flags.Local.CFlags...)
+
+ // Turn off unused-result warning since it is not important for tests.
+ flags.Local.CFlags = append(flags.Local.CFlags, "-Wno-error=unused-result")
switch ctx.Os() {
case android.Windows: