1548bf93fSopenharmony_ci# Copyright (C) 2023 Huawei Device Co., Ltd.
2548bf93fSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3548bf93fSopenharmony_ci# you may not use this file except in compliance with the License.
4548bf93fSopenharmony_ci# You may obtain a copy of the License at
5548bf93fSopenharmony_ci#
6548bf93fSopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
7548bf93fSopenharmony_ci#
8548bf93fSopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9548bf93fSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10548bf93fSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11548bf93fSopenharmony_ci# See the License for the specific language governing permissions and
12548bf93fSopenharmony_ci# limitations under the License.
13548bf93fSopenharmony_ci
14548bf93fSopenharmony_ciimport("//build/ohos.gni")
15548bf93fSopenharmony_ciimport("//foundation/bundlemanager/app_domain_verify/app_domain_verify.gni")
16548bf93fSopenharmony_ci
17548bf93fSopenharmony_ciconfig("app_domain_verify_agent_verifier_config") {
18548bf93fSopenharmony_ci  visibility = [ ":*" ]
19548bf93fSopenharmony_ci  include_dirs = [
20548bf93fSopenharmony_ci    "include",
21548bf93fSopenharmony_ci    "include/constant",
22548bf93fSopenharmony_ci    "${app_domain_verify_common_path}/include",
23548bf93fSopenharmony_ci    "${app_domain_verify_frameworks_common_path}/include",
24548bf93fSopenharmony_ci    "${app_domain_verify_frameworks_common_path}/include/httpsession",
25548bf93fSopenharmony_ci    "${app_domain_verify_frameworks_common_path}/include/utils",
26548bf93fSopenharmony_ci    "${app_domain_verify_frameworks_common_path}/include/bms",
27548bf93fSopenharmony_ci  ]
28548bf93fSopenharmony_ci  configs = [ "//build/config/compiler:exceptions" ]
29548bf93fSopenharmony_ci  ldflags = [ "-Wl,--exclude-libs=ALL" ]
30548bf93fSopenharmony_ci  cflags = [
31548bf93fSopenharmony_ci    "-fdata-sections",
32548bf93fSopenharmony_ci    "-ffunction-sections",
33548bf93fSopenharmony_ci    "-fstack-protector-strong",
34548bf93fSopenharmony_ci    "-D_FORTIFY_SOURCE=2",
35548bf93fSopenharmony_ci    "-Os",
36548bf93fSopenharmony_ci  ]
37548bf93fSopenharmony_ci
38548bf93fSopenharmony_ci  cflags_cc = [ "-Os" ]
39548bf93fSopenharmony_ci}
40548bf93fSopenharmony_ci
41548bf93fSopenharmony_ciohos_shared_library("app_domain_verify_agent_verifier") {
42548bf93fSopenharmony_ci  branch_protector_ret = "pac_ret"
43548bf93fSopenharmony_ci  sources = [
44548bf93fSopenharmony_ci    "src/domain_json_util.cpp",
45548bf93fSopenharmony_ci    "src/domain_verifier.cpp",
46548bf93fSopenharmony_ci    "src/verify_http_task.cpp",
47548bf93fSopenharmony_ci    "src/verify_task.cpp",
48548bf93fSopenharmony_ci  ]
49548bf93fSopenharmony_ci  public_configs = [ ":app_domain_verify_agent_verifier_config" ]
50548bf93fSopenharmony_ci  deps = [
51548bf93fSopenharmony_ci    "${app_domain_verify_client_path}:app_domain_verify_mgr_client",
52548bf93fSopenharmony_ci    "${app_domain_verify_common_path}:app_domain_verify_common",
53548bf93fSopenharmony_ci    "${app_domain_verify_frameworks_common_path}:app_domain_verify_frameworks_common",
54548bf93fSopenharmony_ci  ]
55548bf93fSopenharmony_ci  version_script = "verifier.versionscript"
56548bf93fSopenharmony_ci
57548bf93fSopenharmony_ci  external_deps = [
58548bf93fSopenharmony_ci    "ability_base:base",
59548bf93fSopenharmony_ci    "ability_base:want",
60548bf93fSopenharmony_ci    "ability_runtime:ability_manager",
61548bf93fSopenharmony_ci    "bundle_framework:appexecfwk_base",
62548bf93fSopenharmony_ci    "bundle_framework:appexecfwk_core",
63548bf93fSopenharmony_ci    "c_utils:utils",
64548bf93fSopenharmony_ci    "curl:curl_shared",
65548bf93fSopenharmony_ci    "eventhandler:libeventhandler",
66548bf93fSopenharmony_ci    "ffrt:libffrt",
67548bf93fSopenharmony_ci    "hilog:libhilog",
68548bf93fSopenharmony_ci    "hisysevent:libhisysevent",
69548bf93fSopenharmony_ci    "ipc:ipc_core",
70548bf93fSopenharmony_ci    "json:nlohmann_json_static",
71548bf93fSopenharmony_ci    "netstack:http_client",
72548bf93fSopenharmony_ci    "os_account:os_account_innerkits",
73548bf93fSopenharmony_ci    "safwk:system_ability_fwk",
74548bf93fSopenharmony_ci    "samgr:samgr_proxy",
75548bf93fSopenharmony_ci  ]
76548bf93fSopenharmony_ci  defines = []
77548bf93fSopenharmony_ci  if (build_variant == "user") {
78548bf93fSopenharmony_ci    defines += [ "IS_RELEASE_VERSION" ]
79548bf93fSopenharmony_ci  }
80548bf93fSopenharmony_ci  sanitize = {
81548bf93fSopenharmony_ci    cfi = true
82548bf93fSopenharmony_ci    cfi_cross_dso = true
83548bf93fSopenharmony_ci    debug = false
84548bf93fSopenharmony_ci  }
85548bf93fSopenharmony_ci  subsystem_name = "bundlemanager"
86548bf93fSopenharmony_ci  part_name = "app_domain_verify"
87548bf93fSopenharmony_ci}
88