• 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.
13import("//build/ohos.gni")
14import("//build/ohos_var.gni")
15import("//foundation/distributeddatamgr/datamgr_service/datamgr_service.gni")
16
17group("build_module") {
18  deps = [ ":distributeddatasvcfwk" ]
19}
20config("module_config") {
21  visibility = [ ":*" ]
22  include_dirs = [
23    "include",
24    "include/utils",
25    "${data_service_path}/adapter/include",
26  ]
27}
28
29config("module_public_config") {
30  visibility = [ ":*" ]
31  include_dirs = [
32    "include",
33  ]
34}
35
36ohos_shared_library("distributeddatasvcfwk") {
37  branch_protector_ret = "pac_ret"
38  sanitize = {
39    ubsan = true
40    boundary_sanitize = true
41    cfi = true
42    cfi_cross_dso = true
43    debug = false
44  }
45  sources = [
46    "account/account_delegate.cpp",
47    "access_check/app_access_check_config_manager.cpp",
48    "app_id_mapping/app_id_mapping_config_manager.cpp",
49    "backuprule/backup_rule_manager.cpp",
50    "changeevent/remote_change_event.cpp",
51    "checker/checker_manager.cpp",
52    "cloud/asset_loader.cpp",
53    "cloud/cloud_config_manager.cpp",
54    "cloud/cloud_db.cpp",
55    "cloud/cloud_event.cpp",
56    "cloud/cloud_extra_data.cpp",
57    "cloud/cloud_info.cpp",
58    "cloud/cloud_last_sync_info.cpp",
59    "cloud/cloud_lock_event.cpp",
60    "cloud/cloud_mark.cpp",
61    "cloud/cloud_report.cpp",
62    "cloud/cloud_server.cpp",
63    "cloud/cloud_share_event.cpp",
64    "cloud/cloud_sync_finished_event.cpp",
65    "cloud/make_query_event.cpp",
66    "cloud/schema_meta.cpp",
67    "cloud/sharing_center.cpp",
68    "cloud/subscription.cpp",
69    "cloud/sync_event.cpp",
70    "cloud/sync_strategy.cpp",
71    "communication/connect_manager.cpp",
72    "crypto/crypto_manager.cpp",
73    "device_manager/device_manager_delegate.cpp",
74    "device_sync_app/device_sync_app_manager.cpp",
75    "dfx/reporter.cpp",
76    "directory/directory_manager.cpp",
77    "dump/dump_manager.cpp",
78    "eventcenter/event.cpp",
79    "eventcenter/event_center.cpp",
80    "feature/feature_system.cpp",
81    "feature/static_acts.cpp",
82    "metadata/appid_meta_data.cpp",
83    "metadata/auto_launch_meta_data.cpp",
84    "metadata/capability_meta_data.cpp",
85    "metadata/capability_range.cpp",
86    "metadata/corrupted_meta_data.cpp",
87    "metadata/device_meta_data.cpp",
88    "metadata/matrix_meta_data.cpp",
89    "metadata/meta_data.cpp",
90    "metadata/meta_data_manager.cpp",
91    "metadata/object_user_meta_data.cpp",
92    "metadata/secret_key_meta_data.cpp",
93    "metadata/store_debug_info.cpp",
94    "metadata/store_meta_data.cpp",
95    "metadata/store_meta_data_local.cpp",
96    "metadata/strategy_meta_data.cpp",
97    "metadata/switches_meta_data.cpp",
98    "metadata/user_meta_data.cpp",
99    "metadata/version_meta_data.cpp",
100    "network/network_delegate.cpp",
101    "screen/screen_manager.cpp",
102    "serializable/serializable.cpp",
103    "snapshot/bind_event.cpp",
104    "snapshot/snapshot.cpp",
105    "store/auto_cache.cpp",
106    "thread/thread_manager.cpp",
107    "utils/anonymous.cpp",
108    "utils/base64_utils.cpp",
109    "utils/block_integer.cpp",
110    "utils/constant.cpp",
111    "utils/converter.cpp",
112    "utils/corrupt_reporter.cpp",
113    "utils/crypto.cpp",
114    "utils/ref_count.cpp",
115    "utils/time_utils.cpp",
116  ]
117
118  cflags = [
119    "-Werror",
120    "-Wno-multichar",
121    "-D_LIBCPP_HAS_COND_CLOCKWAIT",
122    "-fdata-sections",
123    "-ffunction-sections",
124  ]
125
126  ldflags = [ "-Wl,--gc-sections" ]
127
128  cflags_cc = [ "-fvisibility=hidden" ]
129
130  configs = [ ":module_config" ]
131
132  public_configs = [ ":module_public_config" ]
133
134  external_deps = [
135    "access_token:libaccesstoken_sdk",
136    "c_utils:utils",
137    "common_event_service:cesfwk_innerkits",
138    "hilog:libhilog",
139    "huks:libhukssdk",
140    "json:nlohmann_json_static",
141    "openssl:libcrypto_shared",
142    "kv_store:datamgr_common",
143    "kv_store:distributeddb",
144  ]
145  subsystem_name = "distributeddatamgr"
146
147  part_name = "datamgr_service"
148  defines = [ "OPENSSL_SUPPRESS_DEPRECATED" ]
149}
150