1# Copyright (c) 2021-2024 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("//arkcompiler/runtime_core/static_core/ark_config.gni")
15if (ark_standalone_build) {
16  import("$build_root/ark.gni")
17} else {
18  import("//build/ohos.gni")
19}
20
21config("verification_public_config") {
22  include_dirs = [
23    "$ark_root/verification",
24    "$target_gen_dir",
25    "$target_gen_dir/include",
26    "$target_gen_dir/../..",
27  ]
28}
29
30ark_gen_file("verification_abs_int_inl_compat_checks_h") {
31  template_file = "templates/abs_int_inl_compat_checks.h.erb"
32  data = [ "$ark_root/verification/verification.yaml" ]
33  api = [ "$ark_root/verification/verification.rb" ]
34  output_file = "$target_gen_dir/include/abs_int_inl_compat_checks.h"
35}
36
37ark_isa_gen("isa_gen_verification_gen") {
38  template_files = [
39    "cflow_iterate_inl_gen.h.erb",
40    "abs_int_inl_gen.h.erb",
41    "job_fill_gen.h.erb",
42    "handle_gen.h.erb",
43  ]
44  sources = "templates"  ## ark_root/templates
45  destination = "$target_gen_dir/include"  ## target_gen_dir/include
46  extra_dependencies = [ ":verification_abs_int_inl_compat_checks_h" ]
47}
48
49ark_gen_file("verification_verifier_messages_h") {
50  template_file = "$ark_root/templates/messages/messages.h.erb"
51  data = [ "$ark_root/verification/messages.yaml" ]
52  api = [ "$ark_root/templates/messages.rb" ]
53  output_file = "$target_gen_dir/include/verifier_messages.h"
54}
55
56ark_gen_file("verification_gen_plugins_gen_inc") {
57  extra_dependencies = [ "$ark_root:concat_plugins_yamls" ]
58  template_file = "$ark_root/verification/gen/templates/plugins_gen.inc.erb"
59  data = [ ark_plugin_options_yaml ]
60  api = [ "$ark_root/templates/plugin_options.rb" ]
61  output_file = "$target_gen_dir/include/plugins_gen.inc"
62}
63
64ark_gen_file("verification_verifier_messages_data_cpp") {
65  template_file =
66      "$ark_root/verification/gen/templates/verifier_messages_data_gen.cpp.erb"
67  data = [ "$ark_root/verification/messages.yaml" ]
68  api = [ "$ark_root/templates/messages.rb" ]
69  output_file = "$target_gen_dir/../verifier_messages_data_gen.cpp"
70}
71