Skip to content

Commit d69637c

Browse files
qdaomingLinkgoron
authored andcommittedJan 31, 2022
build: add --v8-enable-hugepage flag
PR-URL: nodejs#41487 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
1 parent d2d03cf commit d69637c

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed
 

‎common.gypi

+3
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@
6666
'v8_enable_pointer_compression%': 0,
6767
'v8_enable_31bit_smis_on_64bit_arch%': 0,
6868

69+
# Disable v8 hugepage by default.
70+
'v8_enable_hugepage%': 0,
71+
6972
# This is more of a V8 dev setting
7073
# https://github.com/nodejs/node/pull/22920/files#r222779926
7174
'v8_enable_fast_mksnapshot': 0,

‎configure.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,13 @@
776776
default=True,
777777
help='compile V8 with auxiliar functions for native debuggers')
778778

779+
parser.add_argument('--v8-enable-hugepage',
780+
action='store_true',
781+
dest='v8_enable_hugepage',
782+
default=None,
783+
help='Enable V8 transparent hugepage support. This feature is only '+
784+
'available on Linux platform.')
785+
779786
parser.add_argument('--node-builtin-modules-path',
780787
action='store',
781788
dest='node_builtin_modules_path',
@@ -1434,7 +1441,9 @@ def configure_v8(o):
14341441
raise Exception('--enable-d8 is incompatible with --without-bundled-v8.')
14351442
if options.static_zoslib_gyp:
14361443
o['variables']['static_zoslib_gyp'] = options.static_zoslib_gyp
1437-
1444+
if flavor != 'linux' and options.v8_enable_hugepage:
1445+
raise Exception('--v8-enable-hugepage is supported only on linux.')
1446+
o['variables']['v8_enable_hugepage'] = 1 if options.v8_enable_hugepage else 0
14381447

14391448
def configure_openssl(o):
14401449
variables = o['variables']

0 commit comments

Comments
 (0)