Skip to content

Commit e7b98a3

Browse files
addaleaxRafaelGSS
authored andcommitted
build: add option to disable shared readonly heap
PR-URL: #45887 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent b995138 commit e7b98a3

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

configure.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,12 @@
484484
default=None,
485485
help='[Experimental] Enable V8 pointer compression (limits max heap to 4GB and breaks ABI compatibility)')
486486

487+
parser.add_argument('--disable-shared-readonly-heap',
488+
action='store_true',
489+
dest='disable_shared_ro_heap',
490+
default=None,
491+
help='Disable the shared read-only heap feature in V8')
492+
487493
parser.add_argument('--v8-options',
488494
action='store',
489495
dest='v8_options',
@@ -1471,7 +1477,7 @@ def configure_v8(o):
14711477
o['variables']['v8_use_siphash'] = 0 if options.without_siphash else 1
14721478
o['variables']['v8_enable_pointer_compression'] = 1 if options.enable_pointer_compression else 0
14731479
o['variables']['v8_enable_31bit_smis_on_64bit_arch'] = 1 if options.enable_pointer_compression else 0
1474-
o['variables']['v8_enable_shared_ro_heap'] = 0 if options.enable_pointer_compression else 1
1480+
o['variables']['v8_enable_shared_ro_heap'] = 0 if options.enable_pointer_compression or options.disable_shared_ro_heap else 1
14751481
o['variables']['v8_trace_maps'] = 1 if options.trace_maps else 0
14761482
o['variables']['node_use_v8_platform'] = b(not options.without_v8_platform)
14771483
o['variables']['node_use_bundled_v8'] = b(not options.without_bundled_v8)

vcbuild.bat

+3
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ set link_module=
6868
set no_cctest=
6969
set cctest=
7070
set openssl_no_asm=
71+
set no_shared_roheap=
7172
set doc=
7273
set extra_msbuild_args=
7374
set exit_code=0
@@ -146,6 +147,7 @@ if /i "%1"=="link-module" set "link_module= --link-module=%2%link_module%"&got
146147
if /i "%1"=="no-cctest" set no_cctest=1&goto arg-ok
147148
if /i "%1"=="cctest" set cctest=1&goto arg-ok
148149
if /i "%1"=="openssl-no-asm" set openssl_no_asm=1&goto arg-ok
150+
if /i "%1"=="no-shared-roheap" set no_shared_roheap=1&goto arg-ok
149151
if /i "%1"=="doc" set doc=1&goto arg-ok
150152
if /i "%1"=="binlog" set extra_msbuild_args=/binaryLogger:%config%\node.binlog&goto arg-ok
151153

@@ -202,6 +204,7 @@ if defined config_flags set configure_flags=%configure_flags% %config_flags%
202204
if defined target_arch set configure_flags=%configure_flags% --dest-cpu=%target_arch%
203205
if defined debug_nghttp2 set configure_flags=%configure_flags% --debug-nghttp2
204206
if defined openssl_no_asm set configure_flags=%configure_flags% --openssl-no-asm
207+
if defined no_shared_roheap set configure_flags=%configure_flags% --disable-shared-readonly-heap
205208
if defined DEBUG_HELPER set configure_flags=%configure_flags% --verbose
206209
if "%target_arch%"=="x86" if "%PROCESSOR_ARCHITECTURE%"=="AMD64" set configure_flags=%configure_flags% --no-cross-compiling
207210

0 commit comments

Comments
 (0)