Created
January 29, 2015 22:03
-
-
Save arielm/ca170b7c96200e713c73 to your computer and use it in GitHub Desktop.
The path for this file should be: mozjs-31.2.0/js/src/build-android
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ -z $NDK_ROOT ]; then | |
echo "NDK_ROOT MUST BE DEFINED!" | |
echo "e.g. export NDK_ROOT=$HOME/android-ndk" | |
exit -1 | |
fi | |
host_kernel=$(uname -s | tr "[:upper:]" "[:lower:]") | |
host_arch=$(uname -m) | |
cpus=$(sysctl hw.ncpu | awk '{print $2}') | |
TARGET=arm-linux-androideabi | |
TARGET_ARCH=armv7-a | |
GCC_VERSION=4.8 | |
TOOLCHAIN=$NDK_ROOT/toolchains/${TARGET}-${GCC_VERSION}/prebuilt/${host_kernel}-${host_arch} | |
### | |
rm -rf dist | |
rm -f ./config.cache | |
../configure --with-android-ndk=$NDK_ROOT \ | |
--with-android-toolchain=$TOOLCHAIN \ | |
--with-android-version=9 \ | |
--with-android-gnu-compiler-version=${GCC_VERSION} \ | |
--with-arch=${TARGET_ARCH} \ | |
--target=${TARGET} \ | |
--enable-android-libstdcxx \ | |
--disable-shared-js --disable-tests --without-intl-api \ | |
--disable-debug --enable-strip --enable-install-strip \ | |
--disable-threadsafe \ | |
--enable-exact-rooting --enable-gcgenerational | |
make -j$cpus |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment