Bug 1480006 - Enable LTO on Android CI builds. r=froydnj
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 10 Aug 2018 14:55:30 +0900
changeset 434653 9481b9ecaf2f691125d4c19f33aafe9037b16d06
parent 434652 c248b33135af97fc2fcb4224cd4e50ac84783788
child 434654 16c75edf53e22f72ef6105b08d6c423defb89c87
push id107465
push usermh@glandium.org
push dateTue, 04 Sep 2018 22:23:02 +0000
treeherdermozilla-inbound@9481b9ecaf2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1480006
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1480006 - Enable LTO on Android CI builds. r=froydnj
mobile/android/config/mozconfigs/android-aarch64/nightly
mobile/android/config/mozconfigs/android-api-16/nightly
mobile/android/config/mozconfigs/android-x86/nightly
--- a/mobile/android/config/mozconfigs/android-aarch64/nightly
+++ b/mobile/android/config/mozconfigs/android-aarch64/nightly
@@ -1,13 +1,22 @@
 . "$topsrcdir/mobile/android/config/mozconfigs/common"
 
 # Android
 ac_add_options --with-android-min-sdk=21
 ac_add_options --target=aarch64-linux-android
 
 ac_add_options --with-branding=mobile/android/branding/nightly
 
+export AR="$topsrcdir/clang/bin/llvm-ar"
+export NM="$topsrcdir/clang/bin/llvm-nm"
+export RANLIB="$topsrcdir/clang/bin/llvm-ranlib"
+
+# Enable LTO if the NDK is available.
+if [ -z "$NO_NDK" ]; then
+  ac_add_options --enable-lto
+fi
+
 export MOZILLA_OFFICIAL=1
 export MOZ_TELEMETRY_REPORTING=1
 export MOZ_ANDROID_POCKET=1
 
 . "$topsrcdir/mobile/android/config/mozconfigs/common.override"
--- a/mobile/android/config/mozconfigs/android-api-16/nightly
+++ b/mobile/android/config/mozconfigs/android-api-16/nightly
@@ -11,9 +11,18 @@ ac_add_options --target=arm-linux-androi
 
 ac_add_options --with-branding=mobile/android/branding/nightly
 
 export MOZILLA_OFFICIAL=1
 export MOZ_TELEMETRY_REPORTING=1
 export MOZ_ANDROID_MMA=1
 export MOZ_ANDROID_POCKET=1
 
+export AR="$topsrcdir/clang/bin/llvm-ar"
+export NM="$topsrcdir/clang/bin/llvm-nm"
+export RANLIB="$topsrcdir/clang/bin/llvm-ranlib"
+
+# Enable LTO if the NDK is available.
+if [ -z "$NO_NDK" ]; then
+  ac_add_options --enable-lto
+fi
+
 . "$topsrcdir/mobile/android/config/mozconfigs/common.override"
--- a/mobile/android/config/mozconfigs/android-x86/nightly
+++ b/mobile/android/config/mozconfigs/android-x86/nightly
@@ -9,9 +9,18 @@ ac_add_options --target=i686-linux-andro
 ac_add_options --with-android-min-sdk=16
 
 ac_add_options --with-branding=mobile/android/branding/nightly
 
 export MOZILLA_OFFICIAL=1
 export MOZ_TELEMETRY_REPORTING=1
 export MOZ_ANDROID_POCKET=1
 
+export AR="$topsrcdir/clang/bin/llvm-ar"
+export NM="$topsrcdir/clang/bin/llvm-nm"
+export RANLIB="$topsrcdir/clang/bin/llvm-ranlib"
+
+# Enable LTO if the NDK is available.
+if [ -z "$NO_NDK" ]; then
+  ac_add_options --enable-lto
+fi
+
 . "$topsrcdir/mobile/android/config/mozconfigs/common.override"