Skip to content

Commit 676e15c

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 e0c7ba8 commit 676e15c

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
@@ -166,6 +166,9 @@
166166
'v8_enable_pointer_compression_shared_cage%': 0,
167167
'v8_enable_31bit_smis_on_64bit_arch%': 0,
168168

169+
# Size of the contiguous read-only space reservation in the shared cage.
170+
'v8_contiguous_compressed_ro_space_size_mb%': 16,
171+
169172
# Sets -dV8_SHORT_BUILTIN_CALLS
170173
'v8_enable_short_builtin_calls%': 0,
171174

@@ -374,7 +377,11 @@
374377
'defines': ['V8_COMPRESS_POINTERS_IN_MULTIPLE_CAGES'],
375378
}],
376379
['v8_enable_pointer_compression_shared_cage==1', {
377-
'defines': ['V8_COMPRESS_POINTERS_IN_SHARED_CAGE'],
380+
'defines': [
381+
'V8_COMPRESS_POINTERS_IN_SHARED_CAGE',
382+
'V8_CONTIGUOUS_COMPRESSED_RO_SPACE',
383+
'V8_CONTIGUOUS_COMPRESSED_RO_SPACE_SIZE_MB=<(v8_contiguous_compressed_ro_space_size_mb)',
384+
],
378385
}],
379386
['v8_enable_pointer_compression==1 or v8_enable_31bit_smis_on_64bit_arch==1', {
380387
'defines': ['V8_31BIT_SMIS_ON_64BIT_ARCH',],

0 commit comments

Comments
 (0)