diff --git a/deps/crates/crates.gyp b/deps/crates/crates.gyp index 0720ee6dcf3..216b0cff512 100644 --- a/deps/crates/crates.gyp +++ b/deps/crates/crates.gyp @@ -3,6 +3,8 @@ 'cargo%': 'cargo', 'cargo_vendor_dir': './vendor', 'temporal_capi_dir': 'temporal_capi-v0_2', + 'zoneinfo64_dir': 'zoneinfo64-v0_3', + 'temporal_zoneinfo64_data_output': '<(SHARED_INTERMEDIATE_DIR)/src/builtins/builtins-temporal-zoneinfo64-data.cc', 'cargo_rust_target%': '', }, 'conditions': [ @@ -125,5 +127,36 @@ ], }, }, + { + # Bakes zoneinfo64.res into a C++ source for Temporal when ICU is not + # available to load it at runtime. + 'target_name': 'temporal_zoneinfo64_data', + 'type': 'none', + 'toolsets': ['host', 'target'], + 'hard_dependency': 1, + 'direct_dependent_settings': { + 'sources': [ + '<(temporal_zoneinfo64_data_output)', + ], + }, + 'actions': [ + { + 'action_name': 'make_temporal_zoneinfo_cpp', + 'inputs': [ + '../v8/tools/include-file-as-bytes.py', + '<(cargo_vendor_dir)/<(zoneinfo64_dir)/src/data/zoneinfo64.res', + ], + 'outputs': [ + '<(temporal_zoneinfo64_data_output)', + ], + 'action': [ + '<(python)', + '<@(_inputs)', + '<@(_outputs)', + 'zoneinfo64_static_data', + ], + }, + ], + }, ] } diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp index 093be6e5395..fd8394b3708 100644 --- a/tools/v8_gypfiles/v8.gyp +++ b/tools/v8_gypfiles/v8.gyp @@ -1161,6 +1161,11 @@ '../../deps/crates/crates.gyp:temporal_capi', ], }], + ['v8_enable_i18n_support==0', { + 'dependencies': [ + '../../deps/crates/crates.gyp:temporal_zoneinfo64_data', + ], + }], ], 'sources': [ '