Bug 1379032 - Use -Oz as optimization flag on android/clang. r?froydnj
Due to https://github.com/android-ndk/ndk/issues/133#issuecomment-308549264 and
bug 1163171 comment #14, we should use -Oz instead of -Os on Android/clang
MozReview-Commit-ID: 1T6fI87sa33
--- a/old-configure.in
+++ b/old-configure.in
@@ -862,19 +862,22 @@ case "$target" in
MOZ_SYNTH_PICO=1
else
if test "$COMPILE_ENVIRONMENT"; then
MOZ_LINKER=1
fi
fi
MOZ_GFX_OPTIMIZE_MOBILE=1
- MOZ_OPTIMIZE_FLAGS="-Os"
if test -z "$CLANG_CC"; then
- MOZ_OPTIMIZE_FLAGS="-freorder-blocks -fno-reorder-functions $MOZ_OPTIMIZE_FLAGS"
+ MOZ_OPTIMIZE_FLAGS="-freorder-blocks -fno-reorder-functions -Os"
+ else
+ # From https://github.com/android-ndk/ndk/issues/133#issuecomment-308549264
+ # -Oz is smaller than -Os on clang.
+ MOZ_OPTIMIZE_FLAGS="-Oz"
fi
;;
*-*linux*)
if test "$GNU_CC" -o "$GNU_CXX"; then
MOZ_PGO_OPTIMIZE_FLAGS="-O3"
if test -n "$MOZ_DEBUG"; then
MOZ_OPTIMIZE_FLAGS="-Os"