1b1994897Sopenharmony_ci# Copyright (c) 2023 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/ark_config.gni")
15b1994897Sopenharmony_ci
16b1994897Sopenharmony_ciarkverifier_sources = [
17b1994897Sopenharmony_ci  "main.cpp",
18b1994897Sopenharmony_ci  "verifier.cpp",
19b1994897Sopenharmony_ci  "verify.cpp",
20b1994897Sopenharmony_ci]
21b1994897Sopenharmony_ci
22b1994897Sopenharmony_ciconfig("arkverifier_public_config") {
23b1994897Sopenharmony_ci  include_dirs = [ "$ark_root/verifier" ]
24b1994897Sopenharmony_ci}
25b1994897Sopenharmony_ci
26b1994897Sopenharmony_ciarkverifier_configs = [
27b1994897Sopenharmony_ci  "$ark_root:ark_config",
28b1994897Sopenharmony_ci  "$ark_root/libpandafile:arkfile_public_config",
29b1994897Sopenharmony_ci  ":arkverifier_public_config",
30b1994897Sopenharmony_ci]
31b1994897Sopenharmony_ci
32b1994897Sopenharmony_ciohos_executable("ark_verifier") {
33b1994897Sopenharmony_ci  sources = arkverifier_sources
34b1994897Sopenharmony_ci
35b1994897Sopenharmony_ci  deps = [ "$ark_root/libpandafile:libarkfile_static_verifier" ]
36b1994897Sopenharmony_ci  external_deps = [
37b1994897Sopenharmony_ci    "zlib:libz",
38b1994897Sopenharmony_ci    sdk_libc_secshared_dep,
39b1994897Sopenharmony_ci  ]
40b1994897Sopenharmony_ci
41b1994897Sopenharmony_ci  if (enable_hilog) {
42b1994897Sopenharmony_ci    external_deps += [ "hilog:libhilog" ]
43b1994897Sopenharmony_ci  }
44b1994897Sopenharmony_ci
45b1994897Sopenharmony_ci  configs = arkverifier_configs
46b1994897Sopenharmony_ci
47b1994897Sopenharmony_ci  public_configs = [ ":arkverifier_public_config" ]
48b1994897Sopenharmony_ci
49b1994897Sopenharmony_ci  install_enable = true
50b1994897Sopenharmony_ci  part_name = "runtime_core"
51b1994897Sopenharmony_ci  subsystem_name = "arkcompiler"
52b1994897Sopenharmony_ci}
53b1994897Sopenharmony_ci
54b1994897Sopenharmony_cilibarkverifier_sources = [
55b1994897Sopenharmony_ci  "verifier.cpp",
56b1994897Sopenharmony_ci  "verify.cpp",
57b1994897Sopenharmony_ci]
58b1994897Sopenharmony_ci
59b1994897Sopenharmony_ciohos_shared_library("libarkverifier") {
60b1994897Sopenharmony_ci  if (!ark_standalone_build) {
61b1994897Sopenharmony_ci    branch_protector_ret = "pac_ret"
62b1994897Sopenharmony_ci  }
63b1994897Sopenharmony_ci  sources = libarkverifier_sources
64b1994897Sopenharmony_ci
65b1994897Sopenharmony_ci  deps = [ "$ark_root/libpandafile:libarkfile_static_verifier" ]
66b1994897Sopenharmony_ci  external_deps = [
67b1994897Sopenharmony_ci    "zlib:libz",
68b1994897Sopenharmony_ci    sdk_libc_secshared_dep,
69b1994897Sopenharmony_ci  ]
70b1994897Sopenharmony_ci  if (enable_hilog) {
71b1994897Sopenharmony_ci    external_deps += [ "hilog:libhilog" ]
72b1994897Sopenharmony_ci  }
73b1994897Sopenharmony_ci
74b1994897Sopenharmony_ci  configs = arkverifier_configs
75b1994897Sopenharmony_ci
76b1994897Sopenharmony_ci  public_configs = [ ":arkverifier_public_config" ]
77b1994897Sopenharmony_ci
78b1994897Sopenharmony_ci  if (!is_standard_system) {
79b1994897Sopenharmony_ci    relative_install_dir = "ark"
80b1994897Sopenharmony_ci  }
81b1994897Sopenharmony_ci
82b1994897Sopenharmony_ci  output_extension = "so"
83b1994897Sopenharmony_ci
84b1994897Sopenharmony_ci  install_enable = true
85b1994897Sopenharmony_ci  part_name = "runtime_core"
86b1994897Sopenharmony_ci  subsystem_name = "arkcompiler"
87b1994897Sopenharmony_ci}
88