• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2022 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("//foundation/filemanagement/dfs_service/distributedfile.gni")
16
17config("public_config") {
18  include_dirs = [ "." ]
19}
20
21config("private_config") {
22  include_dirs = [
23    "${distributedfile_path}/frameworks/native/cloudsync_kit_inner_lite/include",
24    "${distributedfile_path}/frameworks/native/cloudsync_kit_inner/include",
25    "${distributedfile_path}/interfaces/inner_api/native/cloudsync_kit_inner",
26    "${distributedfile_path}/utils/log/include",
27  ]
28}
29
30config("optimize-size") {
31  cflags = [
32    "-fdata-sections",
33    "-ffunction-sections",
34    "-Oz",
35  ]
36  cflags_cc = [
37    "-fvisibility-inlines-hidden",
38    "-Oz",
39  ]
40}
41
42ohos_shared_library("cloudsync_kit_inner") {
43  branch_protector_ret = "pac_ret"
44  configs = [ ":optimize-size" ]
45  sanitize = {
46    integer_overflow = true
47    ubsan = true
48    boundary_sanitize = true
49    cfi = true
50    cfi_cross_dso = true
51    debug = false
52  }
53  sources = [
54    "${distributedfile_path}/frameworks/native/cloudsync_kit_inner/src/cloud_download_callback_client.cpp",
55    "${distributedfile_path}/frameworks/native/cloudsync_kit_inner/src/cloud_download_callback_stub.cpp",
56    "${distributedfile_path}/frameworks/native/cloudsync_kit_inner/src/cloud_download_uri_manager.cpp",
57    "${distributedfile_path}/frameworks/native/cloudsync_kit_inner/src/cloud_optimize_callback_client.cpp",
58    "${distributedfile_path}/frameworks/native/cloudsync_kit_inner/src/cloud_optimize_callback_stub.cpp",
59    "${distributedfile_path}/frameworks/native/cloudsync_kit_inner/src/cloud_sync_callback_client.cpp",
60    "${distributedfile_path}/frameworks/native/cloudsync_kit_inner/src/cloud_sync_callback_stub.cpp",
61    "${distributedfile_path}/frameworks/native/cloudsync_kit_inner/src/cloud_sync_manager.cpp",
62    "${distributedfile_path}/frameworks/native/cloudsync_kit_inner/src/cloud_sync_manager_impl.cpp",
63    "${distributedfile_path}/frameworks/native/cloudsync_kit_inner/src/service_proxy.cpp",
64    "${distributedfile_path}/frameworks/native/cloudsync_kit_inner/src/downgrade_download_callback_client.cpp",
65    "${distributedfile_path}/frameworks/native/cloudsync_kit_inner/src/downgrade_download_callback_stub.cpp",
66    "${distributedfile_path}/utils/log/src/utils_log.cpp",
67  ]
68
69  defines = [
70    "LOG_DOMAIN=0xD004308",
71    "LOG_TAG=\"CLOUDSYNC_API\"",
72  ]
73
74  configs += [ ":private_config" ]
75  public_configs = [
76    ":public_config",
77    "${services_path}/cloudsyncservice:cloud_sync_service_public_config",
78  ]
79
80  external_deps = [
81    "ability_base:zuri",
82    "ability_runtime:ability_manager",
83    "ability_runtime:dataobs_manager",
84    "c_utils:utils",
85    "hilog:libhilog",
86    "ipc:ipc_single",
87    "safwk:system_ability_fwk",
88    "samgr:samgr_proxy",
89  ]
90
91  deps = [
92    "${services_path}/cloudsyncservice:cloud_sync_service_proxy",
93    "${utils_path}:libdistributedfiledentry",
94  ]
95
96  use_exceptions = true
97  part_name = "dfs_service"
98  subsystem_name = "filemanagement"
99}
100
101ohos_shared_library("cloudsync_asset_kit_inner") {
102  branch_protector_ret = "pac_ret"
103  configs = [ ":optimize-size" ]
104  sanitize = {
105    integer_overflow = true
106    ubsan = true
107    boundary_sanitize = true
108    cfi = true
109    cfi_cross_dso = true
110    debug = false
111  }
112  sources = [
113    "${distributedfile_path}/frameworks/native/cloudsync_kit_inner/src/cloud_download_uri_manager.cpp",
114    "${distributedfile_path}/frameworks/native/cloudsync_kit_inner/src/cloud_sync_asset_manager.cpp",
115    "${distributedfile_path}/frameworks/native/cloudsync_kit_inner/src/cloud_sync_asset_manager_impl.cpp",
116    "${distributedfile_path}/frameworks/native/cloudsync_kit_inner/src/download_asset_callback_client.cpp",
117    "${distributedfile_path}/frameworks/native/cloudsync_kit_inner/src/download_asset_callback_stub.cpp",
118    "${distributedfile_path}/frameworks/native/cloudsync_kit_inner/src/service_proxy.cpp",
119  ]
120
121  defines = [
122    "LOG_DOMAIN=0xD004309",
123    "LOG_TAG=\"CLOUD_ASSET_API\"",
124  ]
125
126  configs += [ ":private_config" ]
127  public_configs = [
128    ":public_config",
129    "${services_path}/cloudsyncservice:cloud_sync_service_public_config",
130  ]
131
132  external_deps = [
133    "ability_base:zuri",
134    "c_utils:utils",
135    "hilog:libhilog",
136    "ipc:ipc_single",
137    "safwk:system_ability_fwk",
138    "samgr:samgr_proxy",
139  ]
140
141  deps = [
142    "${services_path}/cloudsyncservice:cloud_sync_service_proxy",
143    "${utils_path}:libdistributedfileutils_lite",
144  ]
145
146  use_exceptions = true
147  innerapi_tags = [ "platformsdk" ]
148  part_name = "dfs_service"
149  subsystem_name = "filemanagement"
150}
151
152ohos_shared_library("cloudsync_kit_inner_lite") {
153  branch_protector_ret = "pac_ret"
154  configs = [ ":optimize-size" ]
155  sanitize = {
156    integer_overflow = true
157    ubsan = true
158    boundary_sanitize = true
159    cfi = true
160    cfi_cross_dso = true
161    debug = false
162    cfi_vcall_icall_only = true
163  }
164  sources = [
165    "${distributedfile_path}/frameworks/native/cloudsync_kit_inner/src/service_proxy.cpp",
166    "${distributedfile_path}/frameworks/native/cloudsync_kit_inner_lite/src/cloud_sync_manager_impl_lite.cpp",
167    "${distributedfile_path}/frameworks/native/cloudsync_kit_inner_lite/src/cloud_sync_manager_lite.cpp",
168  ]
169
170  defines = [
171    "LOG_DOMAIN=0xD004308",
172    "LOG_TAG=\"CloudFileDaemon\"",
173  ]
174
175  configs += [ ":private_config" ]
176  public_configs = [
177    ":public_config",
178    "${services_path}/cloudsyncservice:cloud_sync_service_public_config",
179  ]
180
181  external_deps = [
182    "c_utils:utils",
183    "hilog:libhilog",
184    "ipc:ipc_single",
185    "safwk:system_ability_fwk",
186    "samgr:samgr_proxy",
187  ]
188
189  deps = [
190    "${services_path}/cloudsyncservice:cloud_sync_service_proxy",
191    "${utils_path}:libdistributedfileutils_lite",
192  ]
193
194  use_exceptions = true
195  innerapi_tags = [ "platformsdk" ]
196  part_name = "dfs_service"
197  subsystem_name = "filemanagement"
198}
199