File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,24 @@ In that case copy those two files to the same directory `libv8.so` was
33
33
installed to.
34
34
35
35
36
+ Pointer Compression
37
+ -------------------
38
+
39
+ V8 versions 8.0 and higher enable pointer compression by default.
40
+ See [ the design document] ( https://docs.google.com/document/d/10qh2-b4C5OtSg-xLwyZpEI5ZihVBPtn1xwKBbQC26yI/edit )
41
+ for details.
42
+
43
+ Hence if you use one of the recent version (which you really should),
44
+ then you
45
+
46
+ a) either need to manually disable pointer compression during
47
+ the build of the library by passing the
48
+ ` v8_enable_pointer_compression=false ` flag to ` v8gen.py `
49
+
50
+ b) or compile php-v8js with pointer compression as well, by adding
51
+ ` CPPFLAGS="-DV8_COMPRESS_POINTERS" ` to the ` ./configure ` call.
52
+
53
+
36
54
Compile V8 5.6 and newer (using GN)
37
55
-----------------------------------
38
56
@@ -51,7 +69,7 @@ fetch v8
51
69
cd v8
52
70
53
71
# (optional) If you'd like to build a certain version:
54
- git checkout 6.4.388.18
72
+ git checkout 8.0.426.30
55
73
gclient sync
56
74
57
75
# Setup GN
@@ -83,7 +101,7 @@ cd /tmp
83
101
git clone https://github.com/phpv8/v8js.git
84
102
cd v8js
85
103
phpize
86
- ./configure --with-v8js=/opt/v8 LDFLAGS="-lstdc++"
104
+ ./configure --with-v8js=/opt/v8 LDFLAGS="-lstdc++" CPPFLAGS="-DV8_COMPRESS_POINTERS"
87
105
make
88
106
make test
89
107
sudo make install
You can’t perform that action at this time.
0 commit comments