Skip to content

Commit cb96e6e

Browse files
committed
mention pointer compression in README, closes phpv8#439
1 parent 6f2eeb2 commit cb96e6e

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

README.Linux.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,24 @@ In that case copy those two files to the same directory `libv8.so` was
3333
installed to.
3434

3535

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+
3654
Compile V8 5.6 and newer (using GN)
3755
-----------------------------------
3856

@@ -51,7 +69,7 @@ fetch v8
5169
cd v8
5270
5371
# (optional) If you'd like to build a certain version:
54-
git checkout 6.4.388.18
72+
git checkout 8.0.426.30
5573
gclient sync
5674
5775
# Setup GN
@@ -83,7 +101,7 @@ cd /tmp
83101
git clone https://github.com/phpv8/v8js.git
84102
cd v8js
85103
phpize
86-
./configure --with-v8js=/opt/v8 LDFLAGS="-lstdc++"
104+
./configure --with-v8js=/opt/v8 LDFLAGS="-lstdc++" CPPFLAGS="-DV8_COMPRESS_POINTERS"
87105
make
88106
make test
89107
sudo make install

0 commit comments

Comments
 (0)