Skip to content

Commit aa52873

Browse files
authored
build: add configure option --v8-enable-short-builtin-calls
Add configure option --v8-enable-short-builtin-calls and enable it by default on x86_64 platform. PR-URL: #42109 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Richard Lau <[email protected]>
1 parent db7fa9f commit aa52873

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

configure.py

+9
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,13 @@
782782
help='Enable V8 transparent hugepage support. This feature is only '+
783783
'available on Linux platform.')
784784

785+
parser.add_argument('--v8-enable-short-builtin-calls',
786+
action='store_true',
787+
dest='v8_enable_short_builtin_calls',
788+
default=None,
789+
help='Enable V8 short builtin calls support. This feature is enabled '+
790+
'on x86_64 platform by default.')
791+
785792
parser.add_argument('--node-builtin-modules-path',
786793
action='store',
787794
dest='node_builtin_modules_path',
@@ -1464,6 +1471,8 @@ def configure_v8(o):
14641471
if flavor != 'linux' and options.v8_enable_hugepage:
14651472
raise Exception('--v8-enable-hugepage is supported only on linux.')
14661473
o['variables']['v8_enable_hugepage'] = 1 if options.v8_enable_hugepage else 0
1474+
if options.v8_enable_short_builtin_calls or o['variables']['target_arch'] == 'x64':
1475+
o['variables']['v8_enable_short_builtin_calls'] = 1
14671476

14681477
def configure_openssl(o):
14691478
variables = o['variables']

tools/v8_gypfiles/features.gypi

+6
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@
132132
'v8_enable_pointer_compression%': 0,
133133
'v8_enable_31bit_smis_on_64bit_arch%': 0,
134134

135+
# Sets -dV8_SHORT_BUILTIN_CALLS
136+
'v8_enable_short_builtin_calls%': 0,
137+
135138
# Sets -dOBJECT_PRINT.
136139
'v8_enable_object_print%': 0,
137140

@@ -294,6 +297,9 @@
294297
['v8_enable_pointer_compression==1 or v8_enable_31bit_smis_on_64bit_arch==1', {
295298
'defines': ['V8_31BIT_SMIS_ON_64BIT_ARCH',],
296299
}],
300+
['v8_enable_short_builtin_calls==1', {
301+
'defines': ['V8_SHORT_BUILTIN_CALLS',],
302+
}],
297303
['v8_enable_zone_compression==1', {
298304
'defines': ['V8_COMPRESS_ZONES',],
299305
}],

0 commit comments

Comments
 (0)