Fri 27 May 2011
Building Fennec with Android NDKr5
Posted by Brad Lassey under Android, mobile, Mozilla
1 Comment
The changes required to build Fennec for Android with NDKr5 have landed. Up until now you had to use a custom built version of NDKr4 that included STL support (based off of Crystax’s NDK). Now with NDKr5, you can build Fennec with a stock NDK.
There’s also a performance benefit. We’ve seen a significant performance improvement in many areas from the updated toolchain. However, there is a fairly significant performance regression from JIT’d code that prevents us from switching over to the new toolchain right now. That regression is being tracked in bug 658074 and once it is resolved we’ll turn it on for the automated builders.
If you want to build with NDKr5, you’ll just need to make a couple changes to your mozconfig. Here’s the one I build with:
# Add the correct paths here:
ac_add_options --with-android-ndk="/home/blassey/android-ndk-r5"
ac_add_options --with-android-sdk="/home/blassey/android-sdk-linux_86/platforms/android-8"
ac_add_options --with-android-version=5
ac_add_options --with-android-tools="/home/blassey/android-sdk-linux_86/tools"
ac_add_options --with-android-toolchain="/home/blassey/android-ndk-r5/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86"
ac_add_options --with-android-platform="/home/blassey/android-ndk-r5/platforms/android-5/arch-arm"
# android options
ac_add_options --enable-application=mobile
ac_add_options --target=arm-linux-androideabi
ac_add_options --with-endian=little
ac_add_options --enable-debug-symbols
ac_add_options --with-ccache
ac_add_options --disable-tests
ac_add_options --enable-crashreporter
ac_add_options --disable-elf-hack
This key changes are obviously the paths and changing the target to arm-linux-androideabi.
Special thanks to Alon Zakai for nailing down the last few issues that were stumping me.
One Response to “ Building Fennec with Android NDKr5 ”
Trackbacks & Pingbacks:
[...] Planet Mozilla No Comments May 29, 2011 By Giovanni Panasiti in Planet Mozilla Tags: Android, Brad, Building, Fennec, Lassey, NDKr5 « Mozilla And Google Going After Browser Memory – ConceivablyTech [...]