v8js Ubuntu 16
From DreamFactory
This module allows you to execute server-side JavaScript, using the V8 engine.
These instructions area adapted from https://github.com/phpv8/v8js/blob/master/README.Linux.md
- Install Dependencies
-
$ sudo apt-get install build-essential git python libglib2.0-dev
-
- Install Depot Tools
-
$ cd /tmp
-
$ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
-
$ export PATH=`pwd`/depot_tools:"$PATH"
-
- Download V8
-
$ fetch v8
-
- Setup GN
-
$ cd v8
-
$ tools/dev/v8gen.py -vv x64.release
-
$ echo is_component_build = true >> out.gn/x64.release/args.gn
-
- Build V8
-
$ ninja -C out.gn/x64.release/
-
- Install to /opt/v8
-
$ sudo mkdir -p /opt/v8/{lib,include}
-
$ sudo cp out.gn/x64.release/lib*.so out.gn/x64.release/*_blob.bin /opt/v8/lib/
-
$ sudo cp -R include/* /opt/v8/include/
-