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 "${kv_store_path}/interfaces/innerkits/distributeddata/include", 27 "${kv_store_common_path}", 28 "${kv_store_distributeddb_path}/interfaces/include/", 29 "${kv_store_distributeddb_path}/include/", 30 ] 31} 32 33config("module_public_config") { 34 visibility = [ ":*" ] 35 include_dirs = [ 36 "include", 37 "${data_service_path}/framework/include/account", 38 "${data_service_path}/framework/include/dfx", 39 "${data_service_path}/framework/include/network", 40 "${kv_store_common_path}", 41 ] 42} 43 44ohos_shared_library("distributeddatasvcfwk") { 45 branch_protector_ret = "pac_ret" 46 sanitize = { 47 ubsan = true 48 boundary_sanitize = true 49 cfi = true 50 cfi_cross_dso = true 51 debug = false 52 } 53 sources = [ 54 "account/account_delegate.cpp", 55 "app_id_mapping/app_id_mapping_config_manager.cpp", 56 "backuprule/backup_rule_manager.cpp", 57 "changeevent/remote_change_event.cpp", 58 "checker/checker_manager.cpp", 59 "cloud/asset_loader.cpp", 60 "cloud/cloud_config_manager.cpp", 61 "cloud/cloud_db.cpp", 62 "cloud/cloud_event.cpp", 63 "cloud/cloud_extra_data.cpp", 64 "cloud/cloud_info.cpp", 65 "cloud/cloud_last_sync_info.cpp", 66 "cloud/cloud_lock_event.cpp", 67 "cloud/cloud_report.cpp", 68 "cloud/cloud_server.cpp", 69 "cloud/cloud_share_event.cpp", 70 "cloud/cloud_sync_finished_event.cpp", 71 "cloud/make_query_event.cpp", 72 "cloud/schema_meta.cpp", 73 "cloud/sharing_center.cpp", 74 "cloud/subscription.cpp", 75 "cloud/sync_event.cpp", 76 "cloud/sync_strategy.cpp", 77 "communication/connect_manager.cpp", 78 "dfx/reporter.cpp", 79 "directory/directory_manager.cpp", 80 "dump/dump_manager.cpp", 81 "eventcenter/event.cpp", 82 "eventcenter/event_center.cpp", 83 "feature/feature_system.cpp", 84 "feature/static_acts.cpp", 85 "metadata/appid_meta_data.cpp", 86 "metadata/auto_launch_meta_data.cpp", 87 "metadata/capability_meta_data.cpp", 88 "metadata/capability_range.cpp", 89 "metadata/corrupted_meta_data.cpp", 90 "metadata/matrix_meta_data.cpp", 91 "metadata/meta_data.cpp", 92 "metadata/meta_data_manager.cpp", 93 "metadata/secret_key_meta_data.cpp", 94 "metadata/store_debug_info.cpp", 95 "metadata/store_meta_data.cpp", 96 "metadata/store_meta_data_local.cpp", 97 "metadata/strategy_meta_data.cpp", 98 "metadata/switches_meta_data.cpp", 99 "metadata/user_meta_data.cpp", 100 "metadata/version_meta_data.cpp", 101 "network/network_delegate.cpp", 102 "screen/screen_manager.cpp", 103 "serializable/serializable.cpp", 104 "snapshot/bind_event.cpp", 105 "snapshot/snapshot.cpp", 106 "store/auto_cache.cpp", 107 "thread/thread_manager.cpp", 108 "utils/anonymous.cpp", 109 "utils/base64_utils.cpp", 110 "utils/block_integer.cpp", 111 "utils/constant.cpp", 112 "utils/converter.cpp", 113 "utils/corrupt_reporter.cpp", 114 "utils/crypto.cpp", 115 "utils/ref_count.cpp", 116 "utils/time_utils.cpp", 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 "json:nlohmann_json_static", 140 "openssl:libcrypto_shared", 141 ] 142 subsystem_name = "distributeddatamgr" 143 144 part_name = "datamgr_service" 145 defines = [ "OPENSSL_SUPPRESS_DEPRECATED" ] 146} 147