Skip to content

Commit 9800c29

Browse files
authored
build: port make_temporal_zoneinfo_cpp to GYP
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com> PR-URL: #66183 Refs: #62676 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Richard Lau <richard.lau@ibm.com>
1 parent 847da07 commit 9800c29

2 files changed

Lines changed: 38 additions & 0 deletions

File tree

‎deps/crates/crates.gyp‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
'cargo%': 'cargo',
44
'cargo_vendor_dir': './vendor',
55
'temporal_capi_dir': 'temporal_capi-v0_2',
6+
'zoneinfo64_dir': 'zoneinfo64-v0_3',
7+
'temporal_zoneinfo64_data_output': '<(SHARED_INTERMEDIATE_DIR)/src/builtins/builtins-temporal-zoneinfo64-data.cc',
68
'cargo_rust_target%': '',
79
},
810
'conditions': [
@@ -125,5 +127,36 @@
125127
],
126128
},
127129
},
130+
{
131+
# Bakes zoneinfo64.res into a C++ source for Temporal when ICU is not
132+
# available to load it at runtime.
133+
'target_name': 'temporal_zoneinfo64_data',
134+
'type': 'none',
135+
'toolsets': ['host', 'target'],
136+
'hard_dependency': 1,
137+
'direct_dependent_settings': {
138+
'sources': [
139+
'<(temporal_zoneinfo64_data_output)',
140+
],
141+
},
142+
'actions': [
143+
{
144+
'action_name': 'make_temporal_zoneinfo_cpp',
145+
'inputs': [
146+
'../v8/tools/include-file-as-bytes.py',
147+
'<(cargo_vendor_dir)/<(zoneinfo64_dir)/src/data/zoneinfo64.res',
148+
],
149+
'outputs': [
150+
'<(temporal_zoneinfo64_data_output)',
151+
],
152+
'action': [
153+
'<(python)',
154+
'<@(_inputs)',
155+
'<@(_outputs)',
156+
'zoneinfo64_static_data',
157+
],
158+
},
159+
],
160+
},
128161
]
129162
}

‎tools/v8_gypfiles/v8.gyp‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,6 +1161,11 @@
11611161
'../../deps/crates/crates.gyp:temporal_capi',
11621162
],
11631163
}],
1164+
['v8_enable_i18n_support==0', {
1165+
'dependencies': [
1166+
'../../deps/crates/crates.gyp:temporal_zoneinfo64_data',
1167+
],
1168+
}],
11641169
],
11651170
'sources': [
11661171
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_enable_temporal_support.*?sources \\+= ")',

0 commit comments

Comments
 (0)