Revert "Keep minimal abort when enabling integer overflow check"
This reverts commit 34448f2430a2ebd70b2ac55715f851c71f64f99a.
Reason for revert: RAM regression + something mainline related
Bug: b/235090315
Bug: b/235181175
Bug: b/233840743
Change-Id: Ia1d1b1428c19b1e297dc75618d640bdac81713b0
diff --git a/cc/sanitize.go b/cc/sanitize.go
index 8cf61fa..42a112e 100644
--- a/cc/sanitize.go
+++ b/cc/sanitize.go
@@ -722,6 +722,11 @@
flags.Local.CFlags = append(flags.Local.CFlags, "-fno-sanitize=vptr,function")
}
+ if enableMinimalRuntime(sanitize) {
+ flags.Local.CFlags = append(flags.Local.CFlags, strings.Join(minimalRuntimeFlags, " "))
+ flags.Local.LdFlags = append(flags.Local.LdFlags, "-Wl,--exclude-libs,"+minimalRuntimeLib)
+ }
+
if Bool(sanitize.Properties.Sanitize.Fuzzer) {
// When fuzzing, we wish to crash with diagnostics on any bug.
flags.Local.CFlags = append(flags.Local.CFlags, "-fno-sanitize-trap=all", "-fno-sanitize-recover=all")
@@ -730,12 +735,6 @@
} else {
flags.Local.CFlags = append(flags.Local.CFlags, "-fsanitize-trap=all", "-ftrap-function=abort")
}
-
- if enableMinimalRuntime(sanitize) {
- flags.Local.CFlags = append(flags.Local.CFlags, strings.Join(minimalRuntimeFlags, " "))
- flags.Local.LdFlags = append(flags.Local.LdFlags, "-Wl,--exclude-libs,"+minimalRuntimeLib)
- }
-
// http://b/119329758, Android core does not boot up with this sanitizer yet.
if toDisableImplicitIntegerChange(flags.Local.CFlags) {
flags.Local.CFlags = append(flags.Local.CFlags, "-fno-sanitize=implicit-integer-sign-change")