@@ -68,61 +68,6 @@ sudo cp -R include/* /opt/v8/include/
68
68
```
69
69
70
70
71
- Compile V8 versions 5.5 and older (using Gyp)
72
- ---------------------------------------------
73
-
74
-
75
- ```
76
- # Install `build-essential` if you haven't already:
77
- sudo apt install build-essential
78
-
79
- # Install `chrpath` for fixing libv8.so's RUNPATH header, if you haven't already:
80
- sudo apt install chrpath
81
-
82
- cd /tmp
83
-
84
- # Install depot_tools first (needed for source checkout)
85
- git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
86
- export PATH=`pwd`/depot_tools:"$PATH"
87
-
88
- # Download v8
89
- fetch v8
90
- cd v8
91
-
92
- # (optional) If you'd like to build a certain version:
93
- git checkout 4.9.385.28
94
- gclient sync
95
-
96
- # Build (with internal snapshots)
97
- export GYPFLAGS="-Dv8_use_external_startup_data=0"
98
-
99
- # Force gyp to use system-wide ld.gold
100
- export GYPFLAGS="${GYPFLAGS} -Dlinux_use_bundled_gold=0"
101
-
102
- # Compile V8 (using up to 8 CPU cores, requires a lot of RAM, adapt as needed)
103
- make native library=shared snapshot=on -j8
104
-
105
- # Install to /opt/v8
106
- sudo mkdir -p /opt/v8/{lib,include}
107
- sudo cp out/native/lib.target/lib*.so /opt/v8/lib/
108
- sudo cp -R include/* /opt/v8/include
109
-
110
- # Fix libv8.so's RUNPATH header
111
- sudo chrpath -r '$ORIGIN' /opt/v8/lib/libv8.so
112
-
113
- # Install libv8_libplatform.a (V8 >= 5.2.51)
114
- echo -e "create /opt/v8/lib/libv8_libplatform.a\naddlib out/native/obj.target/src/libv8_libplatform.a\nsave\nend" | sudo ar -M
115
-
116
- # ... same for V8 < 5.2.51, libv8_libplatform.a is built in tools/gyp directory
117
- echo -e "create /opt/v8/lib/libv8_libplatform.a\naddlib out/native/obj.target/tools/gyp/libv8_libplatform.a\nsave\nend" | sudo ar -M
118
- ```
119
-
120
- ` libv8_libplatform.a ` should not be copied directly since it's a thin
121
- archive, i.e. it contains only pointers to the build objects, which
122
- otherwise must not be deleted. The simple mri-script converts the
123
- thin archive to a normal archive.
124
-
125
-
126
71
Compile php-v8js itself
127
72
-----------------------
128
73
0 commit comments