Last active
March 31, 2016 15:51
-
-
Save nilportugues/212f469c2f3365637caae8f9a87be0a6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
cd /tmp | |
# Install depot_tools first (needed for source checkout) | |
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git | |
export PATH=`pwd`/depot_tools:"$PATH" | |
# Download v8 | |
fetch v8 | |
cd v8 | |
# (optional) If you'd like to build a certain version: | |
git checkout 4.9.385.28 | |
gclient sync | |
# use libicu of operating system | |
export GYP_DEFINES="use_system_icu=1" | |
# Build (with internal snapshots) | |
export GYPFLAGS="-Dv8_use_external_startup_data=0" | |
make native library=shared snapshot=on -j8 | |
# Install to /usr | |
sudo mkdir -p /usr/lib /usr/include | |
sudo cp out/native/lib.target/lib*.so /usr/lib/ | |
sudo cp -R include/* /usr/include | |
echo -e "create /usr/lib/libv8_libplatform.a\naddlib out/native/obj.target/tools/gyp/libv8_libplatform.a\nsave\nend" | sudo ar -M | |
cd /tmp | |
git clone https://github.com/phpv8/v8js.git | |
cd v8js | |
phpize | |
./configure | |
make | |
make test | |
sudo make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment