File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed
Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,50 @@ Vagrant.configure("2") do |config|
3737 end
3838 }
3939
40+ %w{ 5.9.35 } . each { |version |
41+ config . vm . define "v8-#{ version } " do |i |
42+ i . vm . synced_folder "." , "/data/v8js"
43+
44+ i . vm . provision "shell" , inline : <<-SHELL
45+ gpg --keyserver keys.gnupg.net --recv 7F438280EF8D349F
46+ gpg --armor --export 7F438280EF8D349F | apt-key add -
47+
48+ apt-get update
49+ apt-get install -y software-properties-common gdb tmux git tig curl apache2-utils lcov build-essential python libglib2.0-dev
50+
51+ add-apt-repository ppa:ondrej/php
52+ apt-get update
53+ apt-get install -y php7.1-dev
54+
55+ mkdir -p /data
56+ cd /data
57+
58+ # Install depot_tools first (needed for source checkout)
59+ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
60+ export PATH=`pwd`/depot_tools:"$PATH"
61+
62+ # Download v8
63+ fetch v8
64+ cd v8
65+
66+ # checkout version
67+ git checkout #{ version }
68+ gclient sync
69+
70+ # Setup GN
71+ tools/dev/v8gen.py -vv x64.release -- is_component_build=true
72+
73+ # Build
74+ ninja -C out.gn/x64.release/
75+
76+ # Install to /opt/libv8-#{ version } /
77+ sudo mkdir -p /opt/libv8-#{ version } /{lib,include}
78+ sudo cp out.gn/x64.release/lib*.so out.gn/x64.release/*_blob.bin /opt/libv8-#{ version } /lib/
79+ sudo cp -R include/* /opt/libv8-#{ version } /include/
80+ SHELL
81+ end
82+ }
83+
4084
4185 #
4286 # Fedora-based box with GCC7, V8 5.2 + PHP 7.1 installed
You can’t perform that action at this time.
0 commit comments