The patches and revision of v8 we use in Titanium Mobile
Shell Python
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
v8 @ 2fc41d9
.gclient
.gclient_entries
.gitignore
.gitmodules
Jenkinsfile
LICENSE
README.md
build_mac_v8.sh
build_v8.sh
ndk11c_5.7.patch
ndk11c_5.9.patch
ndk11c_6.0.patch
ndk11c_6.1.patch
ndk14_5.7.patch
ndk14_5.8.patch
ndk14_5.9.patch
ndk14_6.0.patch
ndk14_6.1.patch
publish_v8.sh

README.md

This is where we store the patches and revision of the v8 repository that we use in the Android port of Titanium Mobile. Build Status

To build V8, you'll need:

  • Android NDK r11c

Build V8 for Android against the NDK:

$ ./build_v8.sh -n /path/to/android-ndk

OR

$ export ANDROID_NDK=/path/to/android-ndk
$ ./build_v8.sh

To publish V8 to S3, you'll need s3cmd: http://tcpdiag.dl.sourceforge.net/project/s3tools/s3cmd/1.6.0/s3cmd-1.6.0.tar.gz

The Whole Shebang

# Apply our patches to v8
git apply 0001-Fix-cross-compilation-for-Android-from-a-Mac.patch
git apply 0002-Create-standalone-static-libs.patch

# Install Android NDK
wget http://dl.google.com/android/repository/android-ndk-r11c-linux-x86_64.zip
unzip android-ndk-r11c-linux-x86_64.zip
export ANDROID_NDK=${PWD}/android-ndk-r11c

# Download s3cmd
wget http://tcpdiag.dl.sourceforge.net/project/s3tools/s3cmd/1.6.0/s3cmd-1.6.0.tar.gz
tar -xzf s3cmd-1.6.0.tar.gz
export PATH=${PWD}/s3cmd-1.6.0

# Configure s3cmd
s3cmd --configure

# build v8 for ARM, and then x86
./build_v8.sh -n /path/to/android-ndk-r11c -j16
./build_v8.sh -n /path/to/android-ndk-r11c -j16 -l ia32

# Generate a tarball to publish
./build_v8.sh -t

# Publish
./publish_v8.sh build/release/libv8-5.0.71.33-release.tar.bz2

Full build_v8.sh usage:

$ ./build_v8.sh -h
Usage: ./build_v8.sh options

This script builds v8 against the Android NDK.
Options:
	-h              Show this help message and exit
	-n <ndk_dir>    The path to the Android NDK. Alternatively, you may set the ANDROID_NDK environment variable
	-j <num-cpus>   The number of processors to use in building (passed on to scons)
	-m <mode>       The v8 build mode (release, debug. default: release)
	-t              Build a thirdparty tarball for uploading

Note: This build is designed to work on a 32-bit Linux. If you wish to install it on a 64-bit version, you would need to install 32-bit libraries:

sudo apt-get -y install gcc-multilib g++-multilib