summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Yi Kong <yikong@google.com> 2024-07-15 08:11:55 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-07-15 08:11:55 +0000
commitb3769fcd23c9653d427c89c65f6e9787b93b9c43 (patch)
tree5d653c80f902beb970592ace7145ca2040730e46
parent2dbf71fed8a71a6d955c590ce374b86533b1daee (diff)
parent12bebf956782372b96bdf4e0cc6afdbf4c02c934 (diff)
Merge "Switch host native tests to -Og" into main
-rw-r--r--cc/test.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/cc/test.go b/cc/test.go
index f5bb7610c..c9351e97e 100644
--- a/cc/test.go
+++ b/cc/test.go
@@ -199,7 +199,10 @@ func (test *testDecorator) linkerFlags(ctx ModuleContext, flags Flags) Flags {
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: