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_frameworks_common_config") {
18548bf93fSopenharmony_ci  visibility = [ ":*" ]
19548bf93fSopenharmony_ci  include_dirs = [
20548bf93fSopenharmony_ci    "include",
21548bf93fSopenharmony_ci    "include/utils",
22548bf93fSopenharmony_ci    "include/httpsession",
23548bf93fSopenharmony_ci    "include/bms",
24548bf93fSopenharmony_ci    "include/zidl",
25548bf93fSopenharmony_ci    "include/config",
26548bf93fSopenharmony_ci    "include/dfx",
27548bf93fSopenharmony_ci  ]
28548bf93fSopenharmony_ci  cflags = [
29548bf93fSopenharmony_ci    "-fdata-sections",
30548bf93fSopenharmony_ci    "-ffunction-sections",
31548bf93fSopenharmony_ci    "-fstack-protector-strong",
32548bf93fSopenharmony_ci    "-D_FORTIFY_SOURCE=2",
33548bf93fSopenharmony_ci    "-Os",
34548bf93fSopenharmony_ci  ]
35548bf93fSopenharmony_ci
36548bf93fSopenharmony_ci  cflags_cc = [ "-Os" ]
37548bf93fSopenharmony_ci}
38548bf93fSopenharmony_ci
39548bf93fSopenharmony_ciohos_shared_library("app_domain_verify_frameworks_common") {
40548bf93fSopenharmony_ci  branch_protector_ret = "pac_ret"
41548bf93fSopenharmony_ci  sources = [
42548bf93fSopenharmony_ci    "src/bms/bundle_info_query.cpp",
43548bf93fSopenharmony_ci    "src/config/white_list_config_mgr.cpp",
44548bf93fSopenharmony_ci    "src/httpsession/app_domain_verify_task_mgr.cpp",
45548bf93fSopenharmony_ci    "src/httpsession/i_http_task.cpp",
46548bf93fSopenharmony_ci    "src/utils/domain_url_util.cpp",
47548bf93fSopenharmony_ci  ]
48548bf93fSopenharmony_ci
49548bf93fSopenharmony_ci  public_configs = [ ":app_domain_verify_frameworks_common_config" ]
50548bf93fSopenharmony_ci  version_script = "common.versionscript"
51548bf93fSopenharmony_ci  deps = [ "${app_domain_verify_common_path}:app_domain_verify_common" ]
52548bf93fSopenharmony_ci  external_deps = [
53548bf93fSopenharmony_ci    "ability_base:want",
54548bf93fSopenharmony_ci    "ability_base:zuri",
55548bf93fSopenharmony_ci    "bundle_framework:appexecfwk_base",
56548bf93fSopenharmony_ci    "bundle_framework:appexecfwk_core",
57548bf93fSopenharmony_ci    "c_utils:utils",
58548bf93fSopenharmony_ci    "ffrt:libffrt",
59548bf93fSopenharmony_ci    "hicollie:libhicollie",
60548bf93fSopenharmony_ci    "hilog:libhilog",
61548bf93fSopenharmony_ci    "hisysevent:libhisysevent",
62548bf93fSopenharmony_ci    "ipc:ipc_core",
63548bf93fSopenharmony_ci    "json:nlohmann_json_static",
64548bf93fSopenharmony_ci    "netstack:http_client",
65548bf93fSopenharmony_ci    "os_account:os_account_innerkits",
66548bf93fSopenharmony_ci    "preferences:native_preferences",
67548bf93fSopenharmony_ci    "safwk:system_ability_fwk",
68548bf93fSopenharmony_ci    "samgr:samgr_proxy",
69548bf93fSopenharmony_ci  ]
70548bf93fSopenharmony_ci  defines = []
71548bf93fSopenharmony_ci  if (build_variant == "user") {
72548bf93fSopenharmony_ci    defines += [ "IS_RELEASE_VERSION" ]
73548bf93fSopenharmony_ci  }
74548bf93fSopenharmony_ci  sanitize = {
75548bf93fSopenharmony_ci    cfi = true
76548bf93fSopenharmony_ci    cfi_cross_dso = true
77548bf93fSopenharmony_ci    debug = false
78548bf93fSopenharmony_ci  }
79548bf93fSopenharmony_ci  subsystem_name = "bundlemanager"
80548bf93fSopenharmony_ci  part_name = "app_domain_verify"
81548bf93fSopenharmony_ci}
82