Skip to content

Commit 7e7e3fb

Browse files
codebytereaduh95
authored andcommitted
build: define V8_CONTIGUOUS_COMPRESSED_RO_SPACE for shared cage
Since the V8 14.2 update, `globals.h` sizes the read-only space reservation in the shared pointer compression cage from `V8_CONTIGUOUS_COMPRESSED_RO_SPACE_SIZE_MB`, which BUILD.gn defines together with `V8_CONTIGUOUS_COMPRESSED_RO_SPACE` whenever `v8_enable_pointer_compression_shared_cage` is set. features.gypi defines neither, so builds configured with `--experimental-pointer-compression-shared-cage` fail to compile V8. Define both the way BUILD.gn does, with the same 16 MB default. Refs: #60254 Signed-off-by: Shelley Vohr <shelley.vohr@gmail.com> PR-URL: #65464 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com>
1 parent cadab22 commit 7e7e3fb

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

tools/v8_gypfiles/features.gypi

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@
161161
'v8_enable_pointer_compression_shared_cage%': 0,
162162
'v8_enable_31bit_smis_on_64bit_arch%': 0,
163163

164+
# Size of the contiguous read-only space reservation in the shared cage.
165+
'v8_contiguous_compressed_ro_space_size_mb%': 16,
166+
164167
# Sets -dV8_SHORT_BUILTIN_CALLS
165168
'v8_enable_short_builtin_calls%': 0,
166169

@@ -365,7 +368,11 @@
365368
'defines': ['V8_COMPRESS_POINTERS_IN_MULTIPLE_CAGES'],
366369
}],
367370
['v8_enable_pointer_compression_shared_cage==1', {
368-
'defines': ['V8_COMPRESS_POINTERS_IN_SHARED_CAGE'],
371+
'defines': [
372+
'V8_COMPRESS_POINTERS_IN_SHARED_CAGE',
373+
'V8_CONTIGUOUS_COMPRESSED_RO_SPACE',
374+
'V8_CONTIGUOUS_COMPRESSED_RO_SPACE_SIZE_MB=<(v8_contiguous_compressed_ro_space_size_mb)',
375+
],
369376
}],
370377
['v8_enable_pointer_compression==1 or v8_enable_31bit_smis_on_64bit_arch==1', {
371378
'defines': ['V8_31BIT_SMIS_ON_64BIT_ARCH',],

0 commit comments

Comments
 (0)