Skip to content

Commit

Permalink
build: add --v8-enable-hugepage flag
Browse files Browse the repository at this point in the history
PR-URL: #41487
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
  • Loading branch information
qdaoming authored and danielleadams committed Feb 26, 2022
1 parent ea84c89 commit cafc4d5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@
# See https://github.com/v8/v8/wiki/Untrusted-code-mitigations
'v8_untrusted_code_mitigations': 0,

# Disable v8 hugepage by default.
'v8_enable_hugepage%': 0,

# This is more of a V8 dev setting
# https://github.com/nodejs/node/pull/22920/files#r222779926
'v8_enable_fast_mksnapshot': 0,
Expand Down
11 changes: 10 additions & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,13 @@
default=True,
help='compile V8 with auxiliar functions for native debuggers')

parser.add_argument('--v8-enable-hugepage',
action='store_true',
dest='v8_enable_hugepage',
default=None,
help='Enable V8 transparent hugepage support. This feature is only '+
'available on Linux platform.')

parser.add_argument('--node-builtin-modules-path',
action='store',
dest='node_builtin_modules_path',
Expand Down Expand Up @@ -1436,7 +1443,9 @@ def configure_v8(o):
raise Exception('--enable-d8 is incompatible with --without-bundled-v8.')
if options.static_zoslib_gyp:
o['variables']['static_zoslib_gyp'] = options.static_zoslib_gyp

if flavor != 'linux' and options.v8_enable_hugepage:
raise Exception('--v8-enable-hugepage is supported only on linux.')
o['variables']['v8_enable_hugepage'] = 1 if options.v8_enable_hugepage else 0

def configure_openssl(o):
variables = o['variables']
Expand Down

0 comments on commit cafc4d5

Please sign in to comment.