Use -Og clang option for debug builds (instead of -O2).
This is very similar to O1 (many optimizations still enabled),
with the explicit goal of making the code somewhat debuggable.
For example, this reduces the amount of "optimized away" variables,
while having minimal impact on the execution time of tests (<5%).
Test: time ./art/test.py -r --host --optimizing --64
Change-Id: Icd155211383520d39c3e82a4e2d4975d9573a36d
diff --git a/build/Android.bp b/build/Android.bp
index 69fc564..0b2dc7d 100644
--- a/build/Android.bp
+++ b/build/Android.bp
@@ -324,7 +324,7 @@
art_debug_opt_flag: {
cflags: ["%s"],
conditions_default: {
- cflags: ["-O2"],
+ cflags: ["-Og"],
},
},
},