Skip to content

Commit 9677da4

Browse files
qdaomingdanielleadams
authored andcommittedApr 21, 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 dcc5831 commit 9677da4

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
@@ -70,6 +70,9 @@
7070
# See https://github.com/v8/v8/wiki/Untrusted-code-mitigations
7171
'v8_untrusted_code_mitigations': 0,
7272

73+
# Disable v8 hugepage by default.
74+
'v8_enable_hugepage%': 0,
75+
7376
# This is more of a V8 dev setting
7477
# https://github.com/nodejs/node/pull/22920/files#r222779926
7578
'v8_enable_fast_mksnapshot': 0,

‎configure.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -779,6 +779,13 @@
779779
default=True,
780780
help='compile V8 with auxiliar functions for native debuggers')
781781

782+
parser.add_argument('--v8-enable-hugepage',
783+
action='store_true',
784+
dest='v8_enable_hugepage',
785+
default=None,
786+
help='Enable V8 transparent hugepage support. This feature is only '+
787+
'available on Linux platform.')
788+
782789
parser.add_argument('--node-builtin-modules-path',
783790
action='store',
784791
dest='node_builtin_modules_path',
@@ -1436,7 +1443,9 @@ def configure_v8(o):
14361443
raise Exception('--enable-d8 is incompatible with --without-bundled-v8.')
14371444
if options.static_zoslib_gyp:
14381445
o['variables']['static_zoslib_gyp'] = options.static_zoslib_gyp
1439-
1446+
if flavor != 'linux' and options.v8_enable_hugepage:
1447+
raise Exception('--v8-enable-hugepage is supported only on linux.')
1448+
o['variables']['v8_enable_hugepage'] = 1 if options.v8_enable_hugepage else 0
14401449

14411450
def configure_openssl(o):
14421451
variables = o['variables']

0 commit comments

Comments
 (0)
Please sign in to comment.