• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2023-2025 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("//build/ohos.gni")
15import("../app_domain_verify.gni")
16
17config("app_domain_verify_service_config") {
18  visibility = [ ":*" ]
19  include_dirs = [
20    "${app_domain_verify_client_path}/include",
21    "${app_domain_verify_client_path}/include/sa_interface",
22    "include/manager/constant",
23    "include/manager/core",
24    "include/manager/rdb",
25    "include/manager/zidl",
26    "include/manager/filter",
27    "include/manager/deferred_link",
28    "include/agent/core",
29    "${app_domain_verify_common_path}/include",
30    "${app_domain_verify_common_path}/include/zidl",
31    "${app_domain_verify_frameworks_common_path}/include",
32    "${app_domain_verify_frameworks_common_path}/include/utils",
33    "${app_domain_verify_frameworks_common_path}/include/permission",
34    "${app_domain_verify_frameworks_common_path}/include/bms",
35    "${app_domain_verify_frameworks_common_path}/include/config",
36    "${app_domain_verify_frameworks_common_path}/include/dfx",
37    "${app_domain_verify_frameworks_app_details_rdb_path}/include",
38  ]
39  configs = [ "//build/config/compiler:exceptions" ]
40  ldflags = [ "-Wl,--exclude-libs=ALL" ]
41  cflags = [
42    "-fvisibility=hidden",
43    "-fdata-sections",
44    "-ffunction-sections",
45    "-fstack-protector-strong",
46    "-D_FORTIFY_SOURCE=2",
47    "-Os",
48  ]
49
50  cflags_cc = [
51    "-fvisibility-inlines-hidden",
52    "-Os",
53    "-fstack-protector-strong",
54  ]
55}
56
57ohos_shared_library("app_domain_verify_mgr_service") {
58  branch_protector_ret = "pac_ret"
59  sources = [
60    "${app_domain_verify_frameworks_common_path}/src/bms/bundle_info_query.cpp",
61    "${app_domain_verify_frameworks_common_path}/src/config/white_list_config_mgr.cpp",
62    "${app_domain_verify_frameworks_common_path}/src/permission/permission_manager.cpp",
63    "${app_domain_verify_frameworks_common_path}/src/utils/domain_url_util.cpp",
64    "src/manager/core/app_details_data_mgr.cpp",
65    "src/manager/core/app_domain_verify_data_mgr.cpp",
66    "src/manager/core/app_domain_verify_mgr_service.cpp",
67    "src/manager/deferred_link/ability_filter.cpp",
68    "src/manager/deferred_link/deferred_link_mgr.cpp",
69    "src/manager/filter/app_details_filter.cpp",
70    "src/manager/rdb/app_domain_verify_rdb_data_manager.cpp",
71    "src/manager/rdb/app_domain_verify_rdb_open_callback.cpp",
72    "src/manager/rdb/rdb_migrate_mgr.cpp",
73    "src/manager/zidl/app_domain_verify_mgr_service_proxy.cpp",
74    "src/manager/zidl/app_domain_verify_mgr_service_stub.cpp",
75  ]
76  public_configs = [ ":app_domain_verify_service_config" ]
77  deps = [
78    "${app_domain_verify_client_path}:app_domain_verify_agent_client",
79    "${app_domain_verify_common_path}:app_domain_verify_common",
80    "${app_domain_verify_frameworks_app_details_rdb_path}:app_domain_verify_app_details_rdb",
81  ]
82  defines = [ "API_EXPORT=__attribute__((visibility (\"default\")))" ]
83  if (build_variant == "user") {
84    defines += [ "IS_RELEASE_VERSION" ]
85  }
86  external_deps = [
87    "ability_base:base",
88    "ability_base:want",
89    "ability_base:zuri",
90    "ability_runtime:ability_manager",
91    "access_token:libaccesstoken_sdk",
92    "access_token:libtokenid_sdk",
93    "bundle_framework:appexecfwk_base",
94    "bundle_framework:appexecfwk_core",
95    "cJSON:cjson",
96    "c_utils:utils",
97    "eventhandler:libeventhandler",
98    "ffrt:libffrt",
99    "hilog:libhilog",
100    "hisysevent:libhisysevent",
101    "ipc:ipc_core",
102    "os_account:os_account_innerkits",
103    "preferences:native_preferences",
104    "relational_store:native_rdb",
105    "safwk:system_ability_fwk",
106    "samgr:samgr_proxy",
107  ]
108
109  sanitize = {
110    boundary_sanitize = true
111    cfi = true
112    cfi_cross_dso = true
113    debug = false
114    integer_overflow = true
115    ubsan = true
116  }
117  subsystem_name = "bundlemanager"
118  part_name = "app_domain_verify"
119}
120
121config("app_domain_verify_agent_service_config") {
122  visibility = [ ":*" ]
123  include_dirs = [
124    "${app_domain_verify_client_path}/include",
125    "${app_domain_verify_client_path}/include/sa_interface",
126    "include/agent/core",
127    "include/agent/zidl",
128    "include/manager/core",
129    "include/manager/zidl",
130    "include/manager/rdb",
131    "include/manager/filter",
132    "${app_domain_verify_common_path}/include",
133    "${app_domain_verify_common_path}/include/zidl",
134    "${app_domain_verify_frameworks_common_path}/include",
135    "${app_domain_verify_frameworks_common_path}/include/utils",
136    "${app_domain_verify_frameworks_common_path}/include/permission",
137    "${app_domain_verify_frameworks_common_path}/include/bms",
138    "${app_domain_verify_frameworks_common_path}/include/config",
139    "${app_domain_verify_frameworks_extension_path}/include",
140    "${app_domain_verify_frameworks_verifier_path}/include",
141    "${app_domain_verify_frameworks_app_details_rdb_path}/include",
142    "${app_domain_verify_frameworks_common_path}/include/dfx",
143  ]
144  configs = [ "//build/config/compiler:exceptions" ]
145  ldflags = [ "-Wl,--exclude-libs=ALL" ]
146  cflags = [
147    "-fvisibility=hidden",
148    "-fdata-sections",
149    "-ffunction-sections",
150    "-fstack-protector-strong",
151    "-D_FORTIFY_SOURCE=2",
152    "-Os",
153  ]
154
155  cflags_cc = [
156    "-fvisibility-inlines-hidden",
157    "-Os",
158    "-fstack-protector-strong",
159  ]
160}
161
162ohos_shared_library("app_domain_verify_agent_service") {
163  branch_protector_ret = "pac_ret"
164  sources = [
165    "src/agent/core/app_domain_verify_agent_service.cpp",
166    "src/agent/zidl/app_domain_verify_agent_service_proxy.cpp",
167    "src/agent/zidl/app_domain_verify_agent_service_stub.cpp",
168  ]
169  public_configs = [ ":app_domain_verify_agent_service_config" ]
170  defines = [ "API_EXPORT=__attribute__((visibility (\"default\")))" ]
171  if (build_variant == "user") {
172    defines += [ "IS_RELEASE_VERSION" ]
173  }
174  deps = [
175    "${app_domain_verify_client_path}:app_domain_verify_mgr_client",
176    "${app_domain_verify_common_path}:app_domain_verify_common",
177    "${app_domain_verify_frameworks_app_details_rdb_path}:app_domain_verify_app_details_rdb",
178    "${app_domain_verify_frameworks_common_path}:app_domain_verify_frameworks_common",
179    "${app_domain_verify_frameworks_extension_path}:app_domain_verify_extension_framework",
180    "${app_domain_verify_frameworks_verifier_path}:app_domain_verify_agent_verifier",
181  ]
182
183  external_deps = [
184    "ability_base:base",
185    "ability_base:want",
186    "ability_base:zuri",
187    "ability_runtime:ability_manager",
188    "bundle_framework:appexecfwk_core",
189    "cJSON:cjson",
190    "c_utils:utils",
191    "curl:curl_shared",
192    "eventhandler:libeventhandler",
193    "ffrt:libffrt",
194    "hicollie:libhicollie",
195    "hilog:libhilog",
196    "hisysevent:libhisysevent",
197    "ipc:ipc_core",
198    "netmanager_base:net_conn_manager_if",
199    "netstack:http_client",
200    "os_account:os_account_innerkits",
201    "preferences:native_preferences",
202    "safwk:system_ability_fwk",
203    "samgr:samgr_proxy",
204  ]
205
206  sanitize = {
207    boundary_sanitize = true
208    cfi = true
209    cfi_cross_dso = true
210    debug = false
211    integer_overflow = true
212    ubsan = true
213  }
214  subsystem_name = "bundlemanager"
215  part_name = "app_domain_verify"
216}
217