• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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
17config("distributeddata_adapter_private_config") {
18  visibility = [ ":*" ]
19  include_dirs = []
20
21  cflags = [ "-Wno-multichar" ]
22
23  cflags_cc = [ "-fvisibility=hidden" ]
24  defines = [ "OPENSSL_SUPPRESS_DEPRECATED" ]
25}
26
27config("distributeddata_adapter_public_config") {
28  visibility = [ ":*" ]
29
30  include_dirs = [
31    "include/log",
32    "include/dfx",
33    "include/communicator",
34    "include/autils",
35    "include/utils",
36    "include",
37    "${kv_store_path}/interfaces/innerkits/distributeddata/include/",
38    "${kv_store_common_path}",
39    "${data_service_path}/framework/include",
40  ]
41}
42
43ohos_shared_library("distributeddata_adapter") {
44  branch_protector_ret = "pac_ret"
45  sanitize = {
46    cfi = true
47    cfi_cross_dso = true
48    debug = false
49    boundary_sanitize = true
50    integer_overflow = true
51    ubsan = true
52  }
53  sources = []
54  cflags = [ "-D_LIBCPP_HAS_COND_CLOCKWAIT" ]
55  configs = [ ":distributeddata_adapter_private_config" ]
56  deps = [
57    "${data_service_path}/adapter/account:distributeddata_account_static",
58    "${data_service_path}/adapter/communicator:distributeddata_communicator_static",
59    "${data_service_path}/adapter/dfx:distributeddata_dfx_static",
60    "${data_service_path}/adapter/permission:distributeddata_permission_static",
61    "${data_service_path}/framework:distributeddatasvcfwk",
62  ]
63
64  if (defined(global_parts_info) &&
65      defined(global_parts_info.theme_screenlock_mgr)) {
66    deps += [ "${data_service_path}/adapter/screenlock:distributeddata_screenlock_static" ]
67  }
68
69  external_deps = [
70    "c_utils:utils",
71    "hilog:libhilog",
72    "hisysevent:libhisysevent",
73    "hitrace:hitrace_meter",
74    "hitrace:libhitracechain",
75  ]
76  public_external_deps = [ "device_manager:devicemanagersdk" ]
77  public_configs = [ ":distributeddata_adapter_public_config" ]
78
79  subsystem_name = "distributeddatamgr"
80  part_name = "datamgr_service"
81}
82