Skip to content

Commit 5f874b7

Browse files
committed
fixup! build: port make_temporal_zoneinfo_cpp to GYP
1 parent 0f13a5a commit 5f874b7

2 files changed

Lines changed: 35 additions & 22 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: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,28 +1162,8 @@
11621162
],
11631163
}],
11641164
['v8_enable_i18n_support==0', {
1165-
'sources': [
1166-
'<(SHARED_INTERMEDIATE_DIR)/src/builtins/builtins-temporal-zoneinfo64-data.cc',
1167-
],
1168-
'actions': [
1169-
{
1170-
'action_name': 'make_temporal_zoneinfo_cpp',
1171-
'inputs': [
1172-
'<(V8_ROOT)/tools/include-file-as-bytes.py',
1173-
'../../deps/crates/vendor/zoneinfo64-v0_3/src/data/zoneinfo64.res',
1174-
],
1175-
'outputs': [
1176-
'<(SHARED_INTERMEDIATE_DIR)/src/builtins/builtins-temporal-zoneinfo64-data.cc',
1177-
],
1178-
'action': [
1179-
'<(python)',
1180-
'<(V8_ROOT)/tools/include-file-as-bytes.py',
1181-
'../../deps/crates/vendor/zoneinfo64-v0_3/src/data/zoneinfo64.res',
1182-
'<@(_outputs)',
1183-
'zoneinfo64_static_data',
1184-
],
1185-
'message': 'Generating zoneinfo64 static data for Temporal',
1186-
},
1165+
'dependencies': [
1166+
'../../deps/crates/crates.gyp:temporal_zoneinfo64_data',
11871167
],
11881168
}],
11891169
],

0 commit comments

Comments
 (0)