• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2025 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/config/components/ets_frontend/es2abc_config.gni")
15import("//build/ohos.gni")
16import("//foundation/arkui/ace_engine/ace_config.gni")
17import("//foundation/arkui/ace_engine/build/ace_ext.gni")
18import("//foundation/arkui/ace_engine/build/ace_gen_obj.gni")
19
20base_output_path = get_label_info(":gen_abc_proxyclass", "target_out_dir")
21abcproxyclass_obj_path = base_output_path + "/abc_proxy_class.o"
22abcenumstyle_obj_path = base_output_path + "/abc_enum_style.o"
23abcuicontext_obj_path = base_output_path + "/abc_uicontext.o"
24abcpreload_obj_path = base_output_path + "/abc_preload.o"
25jsmocksystemplugin_obj_path = base_output_path + "/abc_js_mock_system_plugin.o"
26arkTheme_obj_path = base_output_path + "/abc_ark_theme.o"
27arkcomponent_obj_path = base_output_path + "/abc_ark_component.o"
28
29es2abc_gen_abc("gen_stateMgmt_abc") {
30  extra_visibility = [ ":*" ]  # Only targets in this file can depend on this.
31  src_js = rebase_path(base_output_path + "../../../stateMgmt.js")
32  dst_file = rebase_path(base_output_path + "/stateMgmt.abc")
33  in_puts = [ rebase_path(base_output_path + "../../../stateMgmt.js") ]
34  out_puts = [ base_output_path + "/stateMgmt.abc" ]
35
36  extra_dependencies = [
37    "$ace_root/frameworks/bridge/declarative_frontend:run_state_mgmt_build",
38  ]
39}
40
41es2abc_gen_abc("gen_jsEnumStyle_abc") {
42  extra_visibility = [ ":*" ]  # Only targets in this file can depend on this.
43  src_js = rebase_path(
44          "//foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/jsEnumStyle.js")
45  dst_file = rebase_path(base_output_path + "/jsEnumStyle.abc")
46
47  in_puts = [ "//foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/jsEnumStyle.js" ]
48  out_puts = [ base_output_path + "/jsEnumStyle.abc" ]
49}
50
51es2abc_gen_abc("gen_arkTheme_abc") {
52  extra_visibility = [ ":*" ]  # Only targets in this file can depend on this.
53  src_js = rebase_path(
54          "//foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/arkTheme.js")
55  dst_file = rebase_path(base_output_path + "/arkTheme.abc")
56
57  in_puts = [ "//foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/arkTheme.js" ]
58  out_puts = [ base_output_path + "/arkTheme.abc" ]
59}
60
61es2abc_gen_abc("gen_jsUIContext_abc") {
62  extra_visibility = [ ":*" ]  # Only targets in this file can depend on this.
63  src_js = rebase_path(
64          "//foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/jsUIContext.js")
65  dst_file = rebase_path(base_output_path + "/jsUIContext.abc")
66
67  in_puts = [ "//foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/jsUIContext.js" ]
68  out_puts = [ base_output_path + "/jsUIContext.abc" ]
69}
70
71es2abc_gen_abc("gen_jsPreload_abc") {
72  extra_visibility = [ ":*" ]  # Only targets in this file can depend on this.
73  src_js = rebase_path(
74          "//foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/jsPreload.js")
75  dst_file = rebase_path(base_output_path + "/jsPreload.abc")
76
77  in_puts = [ "//foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/jsPreload.js" ]
78  out_puts = [ base_output_path + "/jsPreload.abc" ]
79}
80
81es2abc_gen_abc("gen_arkComponent_abc") {
82  extra_visibility = [ ":*" ]  # Only targets in this file can depend on this.
83  src_js = rebase_path(
84          "//foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/arkComponent.js")
85  dst_file = rebase_path(base_output_path + "/arkComponent.abc")
86
87  in_puts = [ "//foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/arkComponent.js" ]
88  out_puts = [ base_output_path + "/arkComponent.abc" ]
89}
90
91if (!is_arkui_x && (use_mac || use_mingw_win || use_linux)) {
92  es2abc_gen_abc("gen_js_mock_system_plugin_abc") {
93    extra_visibility = [ ":*" ]  # Only targets in this file can depend on this.
94    src_js = rebase_path(
95            "$root_out_dir/obj/ide/tools/previewer/automock/dist/jsMockSystemPlugin.js")
96    dst_file = rebase_path(base_output_path + "/jsMockSystemPlugin.abc")
97
98    in_puts = [ rebase_path(
99            "$root_out_dir/obj/ide/tools/previewer/automock/dist/jsMockSystemPlugin.js") ]
100    out_puts = [ base_output_path + "/jsMockSystemPlugin.abc" ]
101    extra_dependencies =
102        [ "//ide/tools/previewer/automock:gen_snapshot_jsmock" ]
103  }
104}
105
106gen_obj("abc_proxyclass") {
107  input = base_output_path + "/stateMgmt.abc"
108  if (use_mac || use_mingw_win || use_ios || use_linux) {
109    abcproxyclass_obj_path = base_output_path + "/js_proxy_class.c"
110  }
111  output = abcproxyclass_obj_path
112  snapshot_dep = [ ":gen_stateMgmt_abc" ]
113}
114
115gen_obj("abc_enum_style") {
116  input = base_output_path + "/jsEnumStyle.abc"
117  if (use_mac || use_mingw_win || use_linux || use_ios) {
118    abcenumstyle_obj_path = base_output_path + "/jsEnumStyle.c"
119  }
120  output = abcenumstyle_obj_path
121  snapshot_dep = [ ":gen_jsEnumStyle_abc" ]
122}
123
124gen_obj("abc_ark_theme") {
125  input = base_output_path + "/arkTheme.abc"
126  if (use_mac || use_mingw_win || use_ios || use_linux) {
127    arkTheme_obj_path = base_output_path + "/arkTheme.c"
128  }
129  output = arkTheme_obj_path
130  snapshot_dep = [ ":gen_arkTheme_abc" ]
131}
132
133gen_obj("abc_uicontext") {
134  input = base_output_path + "/jsUIContext.abc"
135  if (use_mac || use_mingw_win || use_linux || use_ios) {
136    abcuicontext_obj_path = base_output_path + "/jsUIContext.c"
137  }
138  output = abcuicontext_obj_path
139  snapshot_dep = [ ":gen_jsUIContext_abc" ]
140}
141
142gen_obj("abc_preload") {
143  input = base_output_path + "/jsPreload.abc"
144  if (use_mac || use_mingw_win || use_linux || use_ios) {
145    abcpreload_obj_path = base_output_path + "/jsPreload.c"
146  }
147  output = abcpreload_obj_path
148  snapshot_dep = [ ":gen_jsPreload_abc" ]
149}
150
151gen_obj("abc_ark_component") {
152  input = base_output_path + "/arkComponent.abc"
153  if (use_mac || use_mingw_win || use_ios || use_linux) {
154    arkcomponent_obj_path = base_output_path + "/arkComponent.c"
155  }
156  output = arkcomponent_obj_path
157  snapshot_dep = [ ":gen_arkComponent_abc" ]
158}
159
160if (!is_arkui_x && (use_mac || use_mingw_win || use_linux)) {
161  gen_obj("abc_mock_system_plugin") {
162    input = base_output_path + "/jsMockSystemPlugin.abc"
163    if (use_mac || use_mingw_win || use_linux) {
164      jsmocksystemplugin_obj_path =
165          base_output_path + "/js_mock_system_plugin.c"
166    }
167    output = jsmocksystemplugin_obj_path
168    snapshot_dep = [ ":gen_js_mock_system_plugin_abc" ]
169  }
170}
171
172if (!is_arkui_x) {
173  abc_sources = [ "stateMgmt" ]
174} else {
175  abc_sources = []
176}
177
178foreach(item, abc_sources) {
179  ohos_prebuilt_etc("copy_" + item + "_abc") {
180    source = base_output_path + "/" + item + ".abc"
181    deps = [ ":gen_" + item + "_abc" ]
182    subsystem_name = ace_engine_subsystem
183    part_name = ace_engine_part
184    module_install_dir = "etc/abc/framework"
185  }
186}
187
188template("declarative_js_engine_ark") {
189  forward_variables_from(invoker, "*")
190  platform = invoker.platform
191
192  ohos_source_set(target_name) {
193    subsystem_name = ace_engine_subsystem
194    part_name = ace_engine_part
195    defines += invoker.defines
196    if (target_cpu == "arm64") {
197      defines += [ "APP_USE_ARM64" ]
198    } else if (target_cpu == "arm") {
199      defines += [ "APP_USE_ARM" ]
200    }
201
202    configs = [ "$ace_root:ace_config" ]
203
204    if (ace_engine_feature_enable_point_light) {
205      defines += [ "POINT_LIGHT_ENABLE" ]
206    }
207
208    sources = [
209      "js_converter.cpp",
210      "jsi_container_app_bar_register.cpp",
211      "jsi_container_modal_view_register.cpp",
212      "jsi_declarative_engine.cpp",
213      "jsi_declarative_group_js_bridge.cpp",
214      "jsi_object_template.cpp",
215      "jsi_types.cpp",
216      "jsi_view_register.cpp",
217      "modules/jsi_app_module.cpp",
218      "modules/jsi_context_module.cpp",
219      "modules/jsi_curves_module.cpp",
220      "modules/jsi_matrix4_module.cpp",
221      "modules/jsi_module_manager.cpp",
222      "modules/jsi_router_module.cpp",
223      "modules/jsi_syscap_module.cpp",
224      "modules/jsi_timer_module.cpp",
225      "nativeModule/arkts_native_alphabet_indexer_bridge.cpp",
226      "nativeModule/arkts_native_api_impl_bridge.cpp",
227      "nativeModule/arkts_native_badge_bridge.cpp",
228      "nativeModule/arkts_native_blank_bridge.cpp",
229      "nativeModule/arkts_native_button_bridge.cpp",
230      "nativeModule/arkts_native_calendar_picker_bridge.cpp",
231      "nativeModule/arkts_native_canvas_bridge.cpp",
232      "nativeModule/arkts_native_checkbox_bridge.cpp",
233      "nativeModule/arkts_native_checkboxgroup_bridge.cpp",
234      "nativeModule/arkts_native_column_bridge.cpp",
235      "nativeModule/arkts_native_column_split_bridge.cpp",
236      "nativeModule/arkts_native_common_bridge.cpp",
237      "nativeModule/arkts_native_common_shape_bridge.cpp",
238      "nativeModule/arkts_native_container_span_bridge.cpp",
239      "nativeModule/arkts_native_counter_bridge.cpp",
240      "nativeModule/arkts_native_data_panel_bridge.cpp",
241      "nativeModule/arkts_native_date_picker_bridge.cpp",
242      "nativeModule/arkts_native_divider_bridge.cpp",
243      "nativeModule/arkts_native_flex_bridge.cpp",
244      "nativeModule/arkts_native_frame_node_bridge.cpp",
245      "nativeModule/arkts_native_gauge_bridge.cpp",
246      "nativeModule/arkts_native_grid_bridge.cpp",
247      "nativeModule/arkts_native_grid_col_bridge.cpp",
248      "nativeModule/arkts_native_grid_item_bridge.cpp",
249      "nativeModule/arkts_native_grid_row_bridge.cpp",
250      "nativeModule/arkts_native_hyperlink_bridge.cpp",
251      "nativeModule/arkts_native_image_animator_bridge.cpp",
252      "nativeModule/arkts_native_image_bridge.cpp",
253      "nativeModule/arkts_native_image_span_bridge.cpp",
254      "nativeModule/arkts_native_indicator_component_bridge.cpp",
255      "nativeModule/arkts_native_lazy_grid_layout_bridge.cpp",
256      "nativeModule/arkts_native_line_bridge.cpp",
257      "nativeModule/arkts_native_linear_indicator.cpp",
258      "nativeModule/arkts_native_list_bridge.cpp",
259      "nativeModule/arkts_native_list_item_bridge.cpp",
260      "nativeModule/arkts_native_list_item_group_bridge.cpp",
261      "nativeModule/arkts_native_loading_progress_bridge.cpp",
262      "nativeModule/arkts_native_marquee_bridge.cpp",
263      "nativeModule/arkts_native_menu_bridge.cpp",
264      "nativeModule/arkts_native_menu_item_bridge.cpp",
265      "nativeModule/arkts_native_nav_destination_bridge.cpp",
266      "nativeModule/arkts_native_nav_router_bridge.cpp",
267      "nativeModule/arkts_native_navigation_bridge.cpp",
268      "nativeModule/arkts_native_navigation_utils.cpp",
269      "nativeModule/arkts_native_navigator_bridge.cpp",
270      "nativeModule/arkts_native_node_adapter_bridge.cpp",
271      "nativeModule/arkts_native_node_container_bridge.cpp",
272      "nativeModule/arkts_native_panel_bridge.cpp",
273      "nativeModule/arkts_native_particle_bridge.cpp",
274      "nativeModule/arkts_native_path_bridge.cpp",
275      "nativeModule/arkts_native_pattern_lock_bridge.cpp",
276      "nativeModule/arkts_native_polygon_bridge.cpp",
277      "nativeModule/arkts_native_polyline_bridge.cpp",
278      "nativeModule/arkts_native_progress_bridge.cpp",
279      "nativeModule/arkts_native_radio_bridge.cpp",
280      "nativeModule/arkts_native_rating_bridge.cpp",
281      "nativeModule/arkts_native_rect_bridge.cpp",
282      "nativeModule/arkts_native_refresh_bridge.cpp",
283      "nativeModule/arkts_native_relative_container_bridge.cpp",
284      "nativeModule/arkts_native_render_node_bridge.cpp",
285      "nativeModule/arkts_native_resource_bridge.cpp",
286      "nativeModule/arkts_native_rich_editor_bridge.cpp",
287      "nativeModule/arkts_native_row_bridge.cpp",
288      "nativeModule/arkts_native_row_split_bridge.cpp",
289      "nativeModule/arkts_native_scroll_bridge.cpp",
290      "nativeModule/arkts_native_scrollable_bridge.cpp",
291      "nativeModule/arkts_native_scrollbar_bridge.cpp",
292      "nativeModule/arkts_native_search_bridge.cpp",
293      "nativeModule/arkts_native_select_bridge.cpp",
294      "nativeModule/arkts_native_shape_bridge.cpp",
295      "nativeModule/arkts_native_side_bar_container_bridge.cpp",
296      "nativeModule/arkts_native_slider_bridge.cpp",
297      "nativeModule/arkts_native_span_bridge.cpp",
298      "nativeModule/arkts_native_stack_bridge.cpp",
299      "nativeModule/arkts_native_stepper_item_bridge.cpp",
300      "nativeModule/arkts_native_stepper_bridge.cpp",
301      "nativeModule/arkts_native_swiper_bridge.cpp",
302      "nativeModule/arkts_native_symbol_glyph_bridge.cpp",
303      "nativeModule/arkts_native_symbol_span_bridge.cpp",
304      "nativeModule/arkts_native_tabcontent_bridge.cpp",
305      "nativeModule/arkts_native_tabs_bridge.cpp",
306      "nativeModule/arkts_native_text_area_bridge.cpp",
307      "nativeModule/arkts_native_text_bridge.cpp",
308      "nativeModule/arkts_native_text_clock_bridge.cpp",
309      "nativeModule/arkts_native_text_input_bridge.cpp",
310      "nativeModule/arkts_native_text_timer_bridge.cpp",
311      "nativeModule/arkts_native_textpicker_bridge.cpp",
312      "nativeModule/arkts_native_theme_bridge.cpp",
313      "nativeModule/arkts_native_timepicker_bridge.cpp",
314      "nativeModule/arkts_native_toggle_bridge.cpp",
315      "nativeModule/arkts_native_utils_bridge.cpp",
316      "nativeModule/arkts_native_video_bridge.cpp",
317      "nativeModule/arkts_native_water_flow_bridge.cpp",
318      "nativeModule/arkts_utils.cpp",
319      "nativeModule/ui_context_helper.cpp",
320    ]
321
322    if (defined(config.web_components_support) &&
323        config.web_components_support) {
324      sources += ["nativeModule/arkts_native_web_bridge.cpp",]
325    }
326
327    if (!ace_engine_feature_wearable) {
328      sources += [ "nativeModule/arkts_native_folder_stack_bridge.cpp" ]
329    }
330
331    if (qrcodegen_support) {
332      sources += [ "nativeModule/arkts_native_qrcode_bridge.cpp" ]
333    }
334
335    deps = [
336      "$ace_root/frameworks/core/components/theme:build_theme_code",
337      "${ace_root}/frameworks/core/interfaces/native:ace_core_interfaces_native_node_$platform",
338    ]
339    if (is_arkui_x) {
340      deps += [ "//foundation/graphic/graphic_2d/interfaces/kits/napi/graphic/drawing:drawing_napi_impl" ]
341    }
342    external_deps = [ "graphic_2d:drawing_napi_impl" ]
343    if (!build_ohos_sdk && !is_arkui_x) {
344      external_deps += [
345        "ets_utils:console",
346        "ets_utils:timer"
347      ]
348    }
349    if (use_hilog) {
350      external_deps += [ "hilog:libhilog" ]
351    }
352    if (defined(config.xcomponent_components_support) &&
353        config.xcomponent_components_support) {
354      sources += [
355        "nativeModule/arkts_native_xcomponent_bridge.cpp",
356        "nativeModule/arkts_native_xcomponent_node_bridge.cpp",
357      ]
358      deps += [ "$ace_root/frameworks/core/components_ng/pattern/xcomponent:ace_core_components_xcomponent_pattern_ng_$platform" ]
359      if (is_ohos_standard_system) {
360        deps += [ "$ace_root/interfaces/inner_api/xcomponent_controller:ace_xcomponent_controller" ]
361        external_deps += [
362          "c_utils:utils",
363          "graphic_2d:librender_service_client",
364        ]
365      }
366    }
367
368    if (defined(config.model_component_support) &&
369        config.model_component_support) {
370      sources += [ "nativeModule/arkts_native_component3d_bridge.cpp" ]
371      deps += [ "$ace_root/frameworks/core/components_ng/pattern/model:ace_core_components_model_pattern_ng_$platform" ]
372    }
373
374    if (defined(config.form_components_support) &&
375        config.form_components_support) {
376      sources += [ "nativeModule/arkts_native_form_component_bridge.cpp" ]
377      deps += [ "${ace_root}/frameworks/core/components_ng/pattern/form:ace_core_components_form_pattern_ng_$platform" ]
378
379      if (is_ohos_standard_system) {
380        external_deps += [
381          "ability_base:want",
382          "ability_runtime:app_manager",
383          "bundle_framework:appexecfwk_core",
384          "form_fwk:fmskit_native",
385          "form_fwk:form_manager",
386          "graphic_2d:librender_service_client",
387          "input:libmmi-client",
388          "ipc:ipc_core",
389        ]
390      }
391    }
392
393    if (defined(config.plugin_components_support) &&
394        config.plugin_components_support) {
395      sources += [ "nativeModule/arkts_native_plugin_bridge.cpp" ]
396      deps += [
397        "${ace_root}/frameworks/core/components_ng/pattern/plugin:ace_core_components_plugin_pattern_ng_$platform",
398        "${ace_root}/interfaces/inner_api/ui_service_manager:ui_service_mgr",
399      ]
400      external_deps += [
401        "ability_base:want",
402        "ability_runtime:app_manager",
403        "bundle_framework:appexecfwk_core",
404        "c_utils:utils",
405        "graphic_2d:librender_service_client",
406        "ipc:ipc_core",
407      ]
408      if (os_account_exists) {
409        external_deps += [ "os_account:os_account_innerkits" ]
410      }
411    }
412
413    if (defined(config.window_scene_support) &&
414        config.window_scene_support) {
415      sources += [ "nativeModule/arkts_native_embedded_component_bridge.cpp" ]
416    }
417
418    include_dirs = []
419    if (defined(vendor_configs.extra_view_register_sources)) {
420      include_dirs += vendor_configs.ace_advance_dirs
421      sources += vendor_configs.extra_view_register_sources
422    } else {
423      sources += [ "jsi_extra_view_register.cpp" ]
424    }
425
426    include_dirs += [ "${ace_root}/interfaces/inner_api/ace" ]
427
428    if (!is_arkui_x) {
429      deps +=
430          [ "${ace_root}/interfaces/inner_api/ace:ace_forward_compatibility" ]
431    }
432
433    if (platform == "ohos_ng" || is_arkui_x) {
434      sources += [
435        "jsi_animator_model_ng_build_impl.cpp",
436        "jsi_view_register_impl_ng.cpp",
437      ]
438      if (is_arkui_x) {
439        defines += [ "CROSS_PLATFORM" ]
440      }
441    } else {
442      sources += [
443        "jsi_animator_model_ng_impl.cpp",
444        "jsi_view_register_impl.cpp",
445      ]
446      deps += [ "$ace_root/frameworks/core/components/theme:build_theme_code" ]
447    }
448
449    # add for cross_platfrom_build temporarily, shall be removed after external_deps is supported
450    if (is_arkui_x) {
451      configs += [ "$ark_ets_path:ark_jsruntime_public_config" ]
452      deps += [ "$ark_ets_path:libark_jsruntime_static" ]
453      public_deps = [ "//foundation/arkui/napi:ace_napi" ]
454      include_dirs += [ "//commonlibrary/c_utils/base/include" ]
455    } else {
456      external_deps += [
457        "ets_runtime:libark_jsruntime",
458        "napi:ace_napi",
459      ]
460    }
461
462    if (defined(config.build_for_preview) && config.build_for_preview) {
463      deps += [ ":gen_obj_src_abc_mock_system_plugin" ]
464      sources += [ "utils/jsi_module_searcher.cpp" ]
465      include_dirs += [ "//commonlibrary/c_utils/base/include/" ]
466    } else if (defined(config.use_build_in_js_engine) &&
467               config.use_build_in_js_engine) {
468      if (platform == "ohos_ng" || is_arkui_x) {
469        sources += [
470          "$ace_root/frameworks/bridge/js_frontend/engine/common/js_api_perf.cpp",
471          "$ace_root/frameworks/bridge/js_frontend/engine/jsi/ark_js_runtime.cpp",
472          "$ace_root/frameworks/bridge/js_frontend/engine/jsi/ark_js_value.cpp",
473          "$ace_root/frameworks/bridge/js_frontend/engine/jsi/jsi_base_utils.cpp",
474        ]
475      }
476    } else {
477      sources += [
478        "$ace_root/frameworks/bridge/js_frontend/engine/jsi/ark_js_runtime.cpp",
479        "$ace_root/frameworks/bridge/js_frontend/engine/jsi/ark_js_value.cpp",
480        "$ace_root/frameworks/bridge/js_frontend/engine/jsi/jsi_base_utils.cpp",
481      ]
482    }
483
484    deps += [
485      ":gen_obj_src_abc_ark_component",
486      ":gen_obj_src_abc_ark_theme",
487      ":gen_obj_src_abc_enum_style",
488      ":gen_obj_src_abc_proxyclass",
489    ]
490
491    if (is_arkui_x) {
492      deps += [ ":gen_obj_src_abc_uicontext" ]
493    } else {
494      deps += [ ":gen_obj_src_abc_preload" ]
495    }
496
497    foreach(item, abc_sources) {
498      deps += [ ":copy_" + item + "_abc" ]
499    }
500  }
501}
502
503foreach(item, ace_platforms) {
504  platform = item.name
505  engine_config = {
506  }
507  engine_config = item.config
508  support_engines = []
509  support_engines = engine_config.js_engines
510  foreach(engine, support_engines) {
511    if (engine.engine_name == "ark") {
512      declarative_js_engine_ark("declarative_js_engine_bridge_ark_$platform") {
513        defines = engine.engine_defines
514        config = {
515        }
516
517        if (defined(item.config)) {
518          config = item.config
519        }
520        if (defined(config.defines)) {
521          defines += config.defines
522        }
523      }
524    }
525  }
526}
527