• 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("//foundation/filemanagement/dfs_service/distributedfile.gni")
16
17ohos_shared_library("cloudfiledaemon") {
18  branch_protector_ret = "pac_ret"
19  sanitize = {
20    ubsan = true
21    boundary_sanitize = true
22    cfi = true
23    cfi_cross_dso = true
24    debug = false
25  }
26  cloud_disk = [
27    "src/cloud_disk/database_manager.cpp",
28    "src/cloud_disk/file_operations_base.cpp",
29    "src/cloud_disk/file_operations_cloud.cpp",
30    "src/cloud_disk/file_operations_helper.cpp",
31    "src/cloud_disk/file_operations_local.cpp",
32    "src/cloud_disk/fuse_operations.cpp",
33    "src/cloud_disk/account_status.cpp",
34    "src/cloud_disk/account_status_listener.cpp",
35  ]
36
37  sources = [
38    "src/fuse_manager/fuse_manager.cpp",
39    "src/ipc/cloud_daemon.cpp",
40    "src/ipc/cloud_daemon_stub.cpp",
41  ]
42
43  sources += cloud_disk
44
45  configs = [ "${utils_path}:compiler_configs" ]
46
47  defines = [ "LOG_TAG=\"CloudFileDaemon\"" ]
48
49  include_dirs = [
50    "include",
51    "//third_party/libfuse/include",
52    "//third_party/libfuse/lib",
53    "${innerkits_native_path}/cloud_daemon_kit_inner",
54    "${services_path}/cloudfiledaemon/include/cloud_disk/",
55    "${services_path}/cloudsyncservice/include/data_sync/",
56    "${clouddisk_database_path}/include",
57  ]
58
59  deps = [
60    "${clouddisk_database_path}:clouddisk_database",
61    "${utils_path}:libdistributedfiledentry",
62    "${utils_path}:libdistributedfileutils",
63    "//third_party/libfuse:libfuse",
64  ]
65
66  external_deps = [
67    "ability_base:want",
68    "common_event_service:cesfwk_innerkits",
69    "hilog:libhilog",
70    "ipc:ipc_single",
71    "relational_store:native_rdb",
72    "safwk:system_ability_fwk",
73    "samgr:samgr_proxy",
74  ]
75
76  if (!dfs_service_feature_enable_cloud_adapter) {
77    deps += [
78      "${distributedfile_path}/adapter/cloud_adapter_example:cloud_adapter",
79    ]
80  } else {
81    external_deps += [ "drivekit_native:drivekit" ]
82  }
83
84  use_exceptions = true
85  part_name = "dfs_service"
86  subsystem_name = "filemanagement"
87}
88