1b1994897Sopenharmony_ci# Copyright (c) 2021-2024 Huawei Device Co., Ltd.
2b1994897Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3b1994897Sopenharmony_ci# you may not use this file except in compliance with the License.
4b1994897Sopenharmony_ci# You may obtain a copy of the License at
5b1994897Sopenharmony_ci#
6b1994897Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0
7b1994897Sopenharmony_ci#
8b1994897Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9b1994897Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10b1994897Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11b1994897Sopenharmony_ci# See the License for the specific language governing permissions and
12b1994897Sopenharmony_ci# limitations under the License.
13b1994897Sopenharmony_ci
14b1994897Sopenharmony_ciimport("//arkcompiler/runtime_core/static_core/ark_config.gni")
15b1994897Sopenharmony_ciimport("//arkcompiler/runtime_core/static_vm_config.gni")
16b1994897Sopenharmony_ciimport("$ark_root/plugins/plugins.gni")
17b1994897Sopenharmony_ci
18b1994897Sopenharmony_ciif (ark_standalone_build) {
19b1994897Sopenharmony_ci  import("$build_root/ark.gni")
20b1994897Sopenharmony_ci} else {
21b1994897Sopenharmony_ci  import("//build/ohos.gni")
22b1994897Sopenharmony_ci}
23b1994897Sopenharmony_ci
24b1994897Sopenharmony_cigroup("ark_packages") {
25b1994897Sopenharmony_ci  if (enable_static_vm) {
26b1994897Sopenharmony_ci    deps = plugin_ark_packages
27b1994897Sopenharmony_ci    if (host_os != "mac") {
28b1994897Sopenharmony_ci      deps += [
29b1994897Sopenharmony_ci        "$ark_root/compiler:libarktscompiler",
30b1994897Sopenharmony_ci        "$ark_root/compiler/aot:libarkaotmanager",
31b1994897Sopenharmony_ci        "$ark_root/libpandabase:libarktsbase",
32b1994897Sopenharmony_ci        "$ark_root/libpandafile:libarktsfile",
33b1994897Sopenharmony_ci        "$ark_root/libpandafile/external:libarkfileExt",
34b1994897Sopenharmony_ci        "$ark_root/libpandafile/external:libarksupport",
35b1994897Sopenharmony_ci        "$ark_root/libziparchive:libarktsziparchive",
36b1994897Sopenharmony_ci        "$ark_root/panda:arkts_bin",
37b1994897Sopenharmony_ci        "$ark_root/runtime:libarkruntime",
38b1994897Sopenharmony_ci        "$ark_root/runtime/tooling/inspector:libarkinspector",
39b1994897Sopenharmony_ci        "$ark_root/verification/verifier:verifier.config",
40b1994897Sopenharmony_ci        "$ark_root/verification/verifier:verifier_bin",
41b1994897Sopenharmony_ci      ]
42b1994897Sopenharmony_ci      if (enable_codegen) {
43b1994897Sopenharmony_ci        deps += [
44b1994897Sopenharmony_ci          "$ark_root/compiler/optimizer/code_generator:libarkencoder",
45b1994897Sopenharmony_ci          "$ark_root/compiler/tools/paoc:ark_aot",
46b1994897Sopenharmony_ci        ]
47b1994897Sopenharmony_ci      }
48b1994897Sopenharmony_ci    }
49b1994897Sopenharmony_ci  }
50b1994897Sopenharmony_ci}
51b1994897Sopenharmony_ci
52b1994897Sopenharmony_cigroup("ark_host_linux_tools_packages") {
53b1994897Sopenharmony_ci  deps = plugin_ark_host_linux_tools_packages
54b1994897Sopenharmony_ci  if (host_os != "mac" && current_cpu != "arm") {
55b1994897Sopenharmony_ci    deps += [
56b1994897Sopenharmony_ci      "$ark_root/assembler:arkts_asm(${host_toolchain})",
57b1994897Sopenharmony_ci      "$ark_root/compiler:libarktscompiler(${host_toolchain})",
58b1994897Sopenharmony_ci      "$ark_root/compiler/aot:libarkaotmanager(${host_toolchain})",
59b1994897Sopenharmony_ci      "$ark_root/libpandabase:libarktsbase(${host_toolchain})",
60b1994897Sopenharmony_ci      "$ark_root/libpandafile:libarktsfile(${host_toolchain})",
61b1994897Sopenharmony_ci      "$ark_root/libpandafile/external:libarkfileExt(${host_toolchain})",
62b1994897Sopenharmony_ci      "$ark_root/libpandafile/external:libarksupport(${host_toolchain})",
63b1994897Sopenharmony_ci      "$ark_root/libziparchive:libarktsziparchive(${host_toolchain})",
64b1994897Sopenharmony_ci      "$ark_root/panda:arkts_bin(${host_toolchain})",
65b1994897Sopenharmony_ci      "$ark_root/runtime:libarkruntime(${host_toolchain})",
66b1994897Sopenharmony_ci    ]
67b1994897Sopenharmony_ci    if (enable_codegen) {
68b1994897Sopenharmony_ci      deps += [ "$ark_root/compiler/optimizer/code_generator:libarkencoder(${host_toolchain})" ]
69b1994897Sopenharmony_ci    }
70b1994897Sopenharmony_ci
71b1994897Sopenharmony_ci    # TODO: don't exclude these targets from OHOS build
72b1994897Sopenharmony_ci    if (ark_static_standalone_build) {
73b1994897Sopenharmony_ci      deps += [
74b1994897Sopenharmony_ci        "$ark_root/compiler/tools/aotdump:ark_aotdump(${host_toolchain})",
75b1994897Sopenharmony_ci        "$ark_root/compiler/tools/paoc:ark_aot(${host_toolchain})",
76b1994897Sopenharmony_ci        "$ark_root/disassembler:arkts_disasm(${host_toolchain})",
77b1994897Sopenharmony_ci        "$ark_root/static_linker:ark_link(${host_toolchain})",
78b1994897Sopenharmony_ci      ]
79b1994897Sopenharmony_ci    }
80b1994897Sopenharmony_ci  }
81b1994897Sopenharmony_ci}
82b1994897Sopenharmony_ci
83b1994897Sopenharmony_cigroup("ark_host_windows_tools_packages") {
84b1994897Sopenharmony_ci  deps = plugin_ark_host_windows_tools_packages
85b1994897Sopenharmony_ci  if (host_os != "mac" && current_cpu != "arm" &&
86b1994897Sopenharmony_ci      !ark_static_standalone_build && !ark_standalone_build) {
87b1994897Sopenharmony_ci    deps += [
88b1994897Sopenharmony_ci      "$ark_root/assembler:arkts_asm(//build/toolchain/mingw:mingw_x86_64)",
89b1994897Sopenharmony_ci      "$ark_root/disassembler:arkts_disasm(//build/toolchain/mingw:mingw_x86_64)",
90b1994897Sopenharmony_ci      "$ark_root/static_linker:ark_link(//build/toolchain/mingw:mingw_x86_64)",
91b1994897Sopenharmony_ci    ]
92b1994897Sopenharmony_ci  }
93b1994897Sopenharmony_ci}
94b1994897Sopenharmony_ci
95b1994897Sopenharmony_cigroup("ark_host_mac_tools_packages") {
96b1994897Sopenharmony_ci  deps = plugin_ark_host_mac_tools_packages
97b1994897Sopenharmony_ci  if (host_os == "mac") {
98b1994897Sopenharmony_ci    deps += [
99b1994897Sopenharmony_ci      "$ark_root/assembler:arkts_asm(//build/toolchain/mac:clang_x64)",
100b1994897Sopenharmony_ci      "$ark_root/disassembler:arkts_disasm(//build/toolchain/mac:clang_x64)",
101b1994897Sopenharmony_ci      "$ark_root/libpandabase:libarktsbase(//build/toolchain/mac:clang_x64)",
102b1994897Sopenharmony_ci      "$ark_root/libpandafile:libarktsfile(//build/toolchain/mac:clang_x64)",
103b1994897Sopenharmony_ci      "$ark_root/libziparchive:libarktsziparchive(//build/toolchain/mac:clang_x64)",
104b1994897Sopenharmony_ci      "$ark_root/static_linker:ark_link(//build/toolchain/mac:clang_x64)",
105b1994897Sopenharmony_ci    ]
106b1994897Sopenharmony_ci  }
107b1994897Sopenharmony_ci}
108b1994897Sopenharmony_ci
109b1994897Sopenharmony_cigroup("ark_host_tests") {
110b1994897Sopenharmony_ci  testonly = true
111b1994897Sopenharmony_ci  deps = []
112b1994897Sopenharmony_ci  if (defined(extras)) {
113b1994897Sopenharmony_ci    foreach(ext, extras) {
114b1994897Sopenharmony_ci      deps += [ "${ext}:host_tests" ]
115b1994897Sopenharmony_ci    }
116b1994897Sopenharmony_ci  }
117b1994897Sopenharmony_ci}
118b1994897Sopenharmony_ci
119b1994897Sopenharmony_ci# Common config for ark source
120b1994897Sopenharmony_ciconfig("ark_config") {
121b1994897Sopenharmony_ci  if (!ark_static_standalone_build) {
122b1994897Sopenharmony_ci    visibility = [
123b1994897Sopenharmony_ci      "$ark_es2panda_root:libes2panda",
124b1994897Sopenharmony_ci      "$ark_es2panda_root:libes2panda_frontend_static",
125b1994897Sopenharmony_ci      "$ark_es2panda_root:libes2panda_public",
126b1994897Sopenharmony_ci      "$ark_es2panda_root:libes2panda_public_frontend_static",
127b1994897Sopenharmony_ci      "$ark_es2panda_root/aot:ets2panda",
128b1994897Sopenharmony_ci      "$ark_third_party_root/asmjit:*",
129b1994897Sopenharmony_ci      "$ark_third_party_root/vixl:*",
130b1994897Sopenharmony_ci      "./*",
131b1994897Sopenharmony_ci    ]
132b1994897Sopenharmony_ci  }
133b1994897Sopenharmony_ci
134b1994897Sopenharmony_ci  include_dirs = [
135b1994897Sopenharmony_ci    "$ark_root",
136b1994897Sopenharmony_ci    get_label_info(":create_pipeline(${default_toolchain})", "target_gen_dir"),
137b1994897Sopenharmony_ci  ]
138b1994897Sopenharmony_ci  defines = [ "PANDA_TARGET_MOBILE_WITH_MANAGED_LIBS=1" ]
139b1994897Sopenharmony_ci  if (enable_codegen) {
140b1994897Sopenharmony_ci    defines += [ "PANDA_COMPILER_ENABLE" ]
141b1994897Sopenharmony_ci  }
142b1994897Sopenharmony_ci  if (is_emulator) {
143b1994897Sopenharmony_ci    defines += [ "PANDA_TARGET_EMULATOR" ]
144b1994897Sopenharmony_ci  }
145b1994897Sopenharmony_ci
146b1994897Sopenharmony_ci  if (is_llvm_interpreter || is_llvm_fastpath) {
147b1994897Sopenharmony_ci    defines += [ "PANDA_LLVM_IRTOC" ]
148b1994897Sopenharmony_ci    if (is_llvm_interpreter) {
149b1994897Sopenharmony_ci      defines += [ "PANDA_LLVM_INTERPRETER" ]
150b1994897Sopenharmony_ci    }
151b1994897Sopenharmony_ci    if (is_llvm_fastpath) {
152b1994897Sopenharmony_ci      defines += [ "PANDA_LLVM_FASTPATH" ]
153b1994897Sopenharmony_ci    }
154b1994897Sopenharmony_ci  }
155b1994897Sopenharmony_ci  if (is_llvm_aot) {
156b1994897Sopenharmony_ci    defines += [ "PANDA_LLVM_AOT" ]
157b1994897Sopenharmony_ci  }
158b1994897Sopenharmony_ci
159b1994897Sopenharmony_ci  if (is_ohos && is_standard_system) {
160b1994897Sopenharmony_ci    defines += [ "PANDA_TARGET_OHOS" ]
161b1994897Sopenharmony_ci    include_dirs += [ "$hilog_root/include" ]
162b1994897Sopenharmony_ci  }
163b1994897Sopenharmony_ci
164b1994897Sopenharmony_ci  if (is_linux) {
165b1994897Sopenharmony_ci    defines += [
166b1994897Sopenharmony_ci      "PANDA_TARGET_UNIX",
167b1994897Sopenharmony_ci      "PANDA_TARGET_LINUX",
168b1994897Sopenharmony_ci      "PANDA_WITH_BYTECODE_OPTIMIZER",
169b1994897Sopenharmony_ci      "PANDA_WITH_COMPILER",
170b1994897Sopenharmony_ci    ]
171b1994897Sopenharmony_ci    if (enable_irtoc) {
172b1994897Sopenharmony_ci      defines += [ "PANDA_WITH_IRTOC" ]
173b1994897Sopenharmony_ci    }
174b1994897Sopenharmony_ci    if (enable_codegen) {
175b1994897Sopenharmony_ci      defines += [ "PANDA_WITH_CODEGEN" ]
176b1994897Sopenharmony_ci    }
177b1994897Sopenharmony_ci    if (!is_asan) {
178b1994897Sopenharmony_ci      defines += [ "PANDA_USE_FUTEX" ]
179b1994897Sopenharmony_ci    }
180b1994897Sopenharmony_ci  } else if (is_mingw) {
181b1994897Sopenharmony_ci    defines += [
182b1994897Sopenharmony_ci      "PANDA_TARGET_WINDOWS",
183b1994897Sopenharmony_ci      "PANDA_WITH_BYTECODE_OPTIMIZER",
184b1994897Sopenharmony_ci      "PANDA_WITH_COMPILER",
185b1994897Sopenharmony_ci      "_CRTBLD",
186b1994897Sopenharmony_ci      "__LIBMSVCRT__",
187b1994897Sopenharmony_ci    ]
188b1994897Sopenharmony_ci    if (enable_irtoc) {
189b1994897Sopenharmony_ci      defines += [ "PANDA_WITH_IRTOC" ]
190b1994897Sopenharmony_ci    }
191b1994897Sopenharmony_ci    if (enable_codegen) {
192b1994897Sopenharmony_ci      defines += [ "PANDA_WITH_CODEGEN" ]
193b1994897Sopenharmony_ci    }
194b1994897Sopenharmony_ci  } else if (is_mac) {
195b1994897Sopenharmony_ci    defines += [
196b1994897Sopenharmony_ci      "PANDA_TARGET_UNIX",
197b1994897Sopenharmony_ci      "PANDA_TARGET_MACOS",
198b1994897Sopenharmony_ci      "PANDA_WITH_BYTECODE_OPTIMIZER",
199b1994897Sopenharmony_ci      "PANDA_WITH_COMPILER",
200b1994897Sopenharmony_ci
201b1994897Sopenharmony_ci      # "PANDA_USE_FUTEX",
202b1994897Sopenharmony_ci    ]
203b1994897Sopenharmony_ci    if (enable_irtoc) {
204b1994897Sopenharmony_ci      defines += [ "PANDA_WITH_IRTOC" ]
205b1994897Sopenharmony_ci    }
206b1994897Sopenharmony_ci    if (enable_codegen) {
207b1994897Sopenharmony_ci      defines += [ "PANDA_WITH_CODEGEN" ]
208b1994897Sopenharmony_ci    }
209b1994897Sopenharmony_ci  } else if (is_mob) {
210b1994897Sopenharmony_ci    defines += [
211b1994897Sopenharmony_ci      "PANDA_TARGET_UNIX",
212b1994897Sopenharmony_ci      "PANDA_USE_FUTEX",
213b1994897Sopenharmony_ci      "PANDA_TARGET_MOBILE",
214b1994897Sopenharmony_ci      "PANDA_TARGET_MOBILE_WITH_NATIVE_LIBS",
215b1994897Sopenharmony_ci    ]
216b1994897Sopenharmony_ci  } else if (is_ohos) {
217b1994897Sopenharmony_ci    defines += [
218b1994897Sopenharmony_ci      # TODO: use PANDA_TARGET_OHOS instead of PANDA_TARGET_UNIX
219b1994897Sopenharmony_ci      "PANDA_TARGET_UNIX",
220b1994897Sopenharmony_ci      "PANDA_WITH_COMPILER",
221b1994897Sopenharmony_ci    ]
222b1994897Sopenharmony_ci    if (!is_asan) {
223b1994897Sopenharmony_ci      defines += [ "PANDA_USE_FUTEX" ]
224b1994897Sopenharmony_ci    }
225b1994897Sopenharmony_ci    if (enable_irtoc) {
226b1994897Sopenharmony_ci      defines += [ "PANDA_WITH_IRTOC" ]
227b1994897Sopenharmony_ci    }
228b1994897Sopenharmony_ci    if (enable_codegen) {
229b1994897Sopenharmony_ci      defines += [ "PANDA_WITH_CODEGEN" ]
230b1994897Sopenharmony_ci    }
231b1994897Sopenharmony_ci  } else {
232b1994897Sopenharmony_ci    defines += [
233b1994897Sopenharmony_ci      "PANDA_TARGET_UNIX",
234b1994897Sopenharmony_ci      "PANDA_USE_FUTEX",
235b1994897Sopenharmony_ci    ]
236b1994897Sopenharmony_ci  }
237b1994897Sopenharmony_ci
238b1994897Sopenharmony_ci  if (!is_debug) {
239b1994897Sopenharmony_ci    defines += [ "NDEBUG" ]
240b1994897Sopenharmony_ci  }
241b1994897Sopenharmony_ci
242b1994897Sopenharmony_ci  cflags_cc = [
243b1994897Sopenharmony_ci    "-std=c++17",
244b1994897Sopenharmony_ci    "-pedantic",
245b1994897Sopenharmony_ci    "-Wall",
246b1994897Sopenharmony_ci    "-Wextra",
247b1994897Sopenharmony_ci    "-Werror",
248b1994897Sopenharmony_ci    "-fno-rtti",
249b1994897Sopenharmony_ci    "-fno-exceptions",
250b1994897Sopenharmony_ci    "-Wno-invalid-offsetof",
251b1994897Sopenharmony_ci
252b1994897Sopenharmony_ci    "-Wno-gnu-statement-expression",
253b1994897Sopenharmony_ci    "-Wno-unused-parameter",
254b1994897Sopenharmony_ci    "-Wno-unused-result",
255b1994897Sopenharmony_ci  ]
256b1994897Sopenharmony_ci
257b1994897Sopenharmony_ci  cflags_c = []
258b1994897Sopenharmony_ci
259b1994897Sopenharmony_ci  if (ark_static_standalone_build) {
260b1994897Sopenharmony_ci    cflags_cc += [ "-Wno-bitwise-instead-of-logical" ]
261b1994897Sopenharmony_ci  }
262b1994897Sopenharmony_ci
263b1994897Sopenharmony_ci  if (!is_mac && use_pbqp) {
264b1994897Sopenharmony_ci    cflags_cc += [
265b1994897Sopenharmony_ci      # PBQP regalloc
266b1994897Sopenharmony_ci      "-mllvm",
267b1994897Sopenharmony_ci      "-regalloc=pbqp",
268b1994897Sopenharmony_ci    ]
269b1994897Sopenharmony_ci  }
270b1994897Sopenharmony_ci
271b1994897Sopenharmony_ci  if (is_fastverify) {
272b1994897Sopenharmony_ci    cflags_cc += [
273b1994897Sopenharmony_ci      "-O3",
274b1994897Sopenharmony_ci      "-ggdb3",
275b1994897Sopenharmony_ci      "-fno-omit-frame-pointer",
276b1994897Sopenharmony_ci      "-D_GLIBCXX_ASSERTIONS",
277b1994897Sopenharmony_ci    ]
278b1994897Sopenharmony_ci    cflags_c += [
279b1994897Sopenharmony_ci      "-O3",
280b1994897Sopenharmony_ci      "-ggdb3",
281b1994897Sopenharmony_ci      "-fno-omit-frame-pointer",
282b1994897Sopenharmony_ci      "-D_GLIBCXX_ASSERTIONS",
283b1994897Sopenharmony_ci    ]
284b1994897Sopenharmony_ci  } else if (is_debug) {
285b1994897Sopenharmony_ci    cflags_cc += [
286b1994897Sopenharmony_ci      "-Og",
287b1994897Sopenharmony_ci      "-ggdb3",
288b1994897Sopenharmony_ci      "-gdwarf-4",
289b1994897Sopenharmony_ci    ]
290b1994897Sopenharmony_ci  }
291b1994897Sopenharmony_ci
292b1994897Sopenharmony_ci  if (is_asan) {
293b1994897Sopenharmony_ci    cflags_cc += [ "-g" ]
294b1994897Sopenharmony_ci    defines += [ "__SANITIZE_ADDRESS__" ]
295b1994897Sopenharmony_ci    print("ASAN is enabled")
296b1994897Sopenharmony_ci  }
297b1994897Sopenharmony_ci
298b1994897Sopenharmony_ci  if (enable_relayout_profile) {
299b1994897Sopenharmony_ci    defines += [ "PANDA_ENABLE_RELAYOUT_PROFILE" ]
300b1994897Sopenharmony_ci  }
301b1994897Sopenharmony_ci
302b1994897Sopenharmony_ci  configs = plugin_ark_configs
303b1994897Sopenharmony_ci
304b1994897Sopenharmony_ci  if (ark_static_standalone_build) {
305b1994897Sopenharmony_ci    configs += [ sdk_libc_secshared_config ]
306b1994897Sopenharmony_ci  }
307b1994897Sopenharmony_ci
308b1994897Sopenharmony_ci  if (current_cpu == "arm") {
309b1994897Sopenharmony_ci    cflags_cc += [
310b1994897Sopenharmony_ci      "-march=armv7-a",
311b1994897Sopenharmony_ci      "-mfloat-abi=${arm_float_abi}",
312b1994897Sopenharmony_ci      "-marm",
313b1994897Sopenharmony_ci      "-mfpu=vfp",
314b1994897Sopenharmony_ci    ]
315b1994897Sopenharmony_ci
316b1994897Sopenharmony_ci    if (arm_float_abi == "soft") {
317b1994897Sopenharmony_ci      defines += [ "PANDA_TARGET_ARM32_ABI_SOFT=1" ]
318b1994897Sopenharmony_ci    } else if (arm_float_abi == "softfp") {
319b1994897Sopenharmony_ci      defines += [ "PANDA_TARGET_ARM32_ABI_SOFTFP=1" ]
320b1994897Sopenharmony_ci    } else if (arm_float_abi == "hard") {
321b1994897Sopenharmony_ci      defines += [ "PANDA_TARGET_ARM32_ABI_HARD=1" ]
322b1994897Sopenharmony_ci    }
323b1994897Sopenharmony_ci
324b1994897Sopenharmony_ci    defines += [
325b1994897Sopenharmony_ci      "PANDA_TARGET_32",
326b1994897Sopenharmony_ci      "PANDA_TARGET_ARM32",
327b1994897Sopenharmony_ci    ]
328b1994897Sopenharmony_ci  } else if (current_cpu == "arm64") {
329b1994897Sopenharmony_ci    defines += [
330b1994897Sopenharmony_ci      "PANDA_TARGET_ARM64",
331b1994897Sopenharmony_ci      "PANDA_TARGET_64",
332b1994897Sopenharmony_ci      "PANDA_ENABLE_GLOBAL_REGISTER_VARIABLES",
333b1994897Sopenharmony_ci      "PANDA_USE_32_BIT_POINTER",
334b1994897Sopenharmony_ci    ]
335b1994897Sopenharmony_ci  } else if (current_cpu == "x86") {
336b1994897Sopenharmony_ci    defines += [ "PANDA_TARGET_X86" ]
337b1994897Sopenharmony_ci  } else if (current_cpu == "amd64" || current_cpu == "x64" ||
338b1994897Sopenharmony_ci             current_cpu == "x86_64") {
339b1994897Sopenharmony_ci    defines += [
340b1994897Sopenharmony_ci      "PANDA_TARGET_64",
341b1994897Sopenharmony_ci      "PANDA_TARGET_AMD64",
342b1994897Sopenharmony_ci      "PANDA_USE_32_BIT_POINTER",
343b1994897Sopenharmony_ci    ]
344b1994897Sopenharmony_ci  }
345b1994897Sopenharmony_ci}
346b1994897Sopenharmony_ci
347b1994897Sopenharmony_ciconcat_yamls("concat_plugins_yamls") {
348b1994897Sopenharmony_ci  output_file = ark_plugin_options_yaml
349b1994897Sopenharmony_ci  default_file = "$ark_root/templates/plugin_options.yaml"
350b1994897Sopenharmony_ci  add_yamls = plugin_option_yamls
351b1994897Sopenharmony_ci}
352b1994897Sopenharmony_ci
353b1994897Sopenharmony_ciconcat_yamls("concat_entrypoints_yamls") {
354b1994897Sopenharmony_ci  output_file = "$target_gen_dir/runtime/entrypoints.yaml"
355b1994897Sopenharmony_ci  default_file = "$ark_root/runtime/entrypoints/entrypoints.yaml"
356b1994897Sopenharmony_ci  add_yamls = plugin_entrypoints_yamls
357b1994897Sopenharmony_ci}
358b1994897Sopenharmony_ci
359b1994897Sopenharmony_ciconcat_yamls("concat_inst_templates_yamls") {
360b1994897Sopenharmony_ci  output_file = "$target_gen_dir/compiler/generated/inst_templates.yaml"
361b1994897Sopenharmony_ci  default_file = "$ark_root/compiler/optimizer/ir_builder/inst_templates.yaml"
362b1994897Sopenharmony_ci  add_yamls = plugin_inst_templates_yamls
363b1994897Sopenharmony_ci}
364b1994897Sopenharmony_ci
365b1994897Sopenharmony_cimerge_yamls("merge_runtime_options_yamls") {
366b1994897Sopenharmony_ci  output_file = "$target_gen_dir/runtime_options.yaml"
367b1994897Sopenharmony_ci  add_yamls =
368b1994897Sopenharmony_ci      [ "$ark_root/runtime/options.yaml" ] + plugin_runtime_options_yamls
369b1994897Sopenharmony_ci}
370b1994897Sopenharmony_ci
371b1994897Sopenharmony_cimerge_yamls("merge_compiler_options_yamls") {
372b1994897Sopenharmony_ci  output_file = "$target_gen_dir/compiler/generated/compiler_options.yaml"
373b1994897Sopenharmony_ci  add_yamls =
374b1994897Sopenharmony_ci      [ "$ark_root/compiler/compiler.yaml" ] + plugin_compiler_options_yamls
375b1994897Sopenharmony_ci}
376