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