From d82e4141f5537c1e1b24199b3982a72088f68c73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Wed, 12 Nov 2025 16:11:16 +0100 Subject: [PATCH] build: add flag to compile V8 with Temporal support It won't work until we build `temporal_capi`, but is a step forward. Refs: https://github.com/nodejs/node/issues/58730 --- configure.py | 8 ++++++++ tools/v8_gypfiles/features.gypi | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/configure.py b/configure.py index a752897e90aa25..c516977b4870d1 100755 --- a/configure.py +++ b/configure.py @@ -1009,6 +1009,13 @@ default=None, help='Enable the built-in snapshot compression in V8.') + +parser.add_argument('--v8-enable-temporal-support', + action='store_true', + dest='v8_enable_temporal_support', + default=None, + help='Enable Temporal support in V8.') + parser.add_argument('--node-builtin-modules-path', action='store', dest='node_builtin_modules_path', @@ -1802,6 +1809,7 @@ def configure_v8(o, configs): o['variables']['v8_enable_external_code_space'] = 1 if options.enable_pointer_compression else 0 o['variables']['v8_enable_31bit_smis_on_64bit_arch'] = 1 if options.enable_pointer_compression else 0 o['variables']['v8_enable_extensible_ro_snapshot'] = 0 + o['variables']['v8_enable_temporal_support'] = 1 if options.v8_enable_temporal_support else 0 o['variables']['v8_trace_maps'] = 1 if options.trace_maps else 0 o['variables']['node_use_v8_platform'] = b(not options.without_v8_platform) o['variables']['node_use_bundled_v8'] = b(not options.without_bundled_v8) diff --git a/tools/v8_gypfiles/features.gypi b/tools/v8_gypfiles/features.gypi index e62b69e9a7175f..c2805da739ce2a 100644 --- a/tools/v8_gypfiles/features.gypi +++ b/tools/v8_gypfiles/features.gypi @@ -295,6 +295,10 @@ # add a dependency on the ICU library. 'v8_enable_i18n_support%': 1, + # Enable Temporal API. Enabling this feature will + # add a dependency on the temporal_rs library. + 'v8_enable_temporal_support%': 0, + # Lite mode disables a number of performance optimizations to reduce memory # at the cost of performance. # Sets --DV8_LITE_MODE. @@ -410,6 +414,9 @@ ['v8_enable_i18n_support==1', { 'defines': ['V8_INTL_SUPPORT',], }], + ['v8_enable_temporal_support==1', { + 'defines': ['V8_TEMPORAL_SUPPORT',], + }], # Refs: https://github.com/nodejs/node/pull/23801 # ['v8_enable_handle_zapping==1', { # 'defines': ['ENABLE_HANDLE_ZAPPING',],