# Copyright (C) 2023 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("//foundation/filemanagement/dfs_service/distributedfile.gni") ohos_shared_library("cloudfiledaemon") { branch_protector_ret = "pac_ret" sanitize = { ubsan = true boundary_sanitize = true cfi = true cfi_cross_dso = true debug = false } cloud_disk = [ "src/cloud_disk/database_manager.cpp", "src/cloud_disk/file_operations_base.cpp", "src/cloud_disk/file_operations_cloud.cpp", "src/cloud_disk/file_operations_helper.cpp", "src/cloud_disk/file_operations_local.cpp", "src/cloud_disk/fuse_operations.cpp", "src/cloud_disk/account_status.cpp", "src/cloud_disk/account_status_listener.cpp", ] sources = [ "src/fuse_manager/fuse_manager.cpp", "src/ipc/cloud_daemon.cpp", "src/ipc/cloud_daemon_stub.cpp", ] sources += cloud_disk configs = [ "${utils_path}:compiler_configs" ] defines = [ "LOG_TAG=\"CloudFileDaemon\"" ] include_dirs = [ "include", "//third_party/libfuse/include", "//third_party/libfuse/lib", "${innerkits_native_path}/cloud_daemon_kit_inner", "${services_path}/cloudfiledaemon/include/cloud_disk/", "${services_path}/cloudsyncservice/include/data_sync/", "${clouddisk_database_path}/include", ] deps = [ "${clouddisk_database_path}:clouddisk_database", "${utils_path}:libdistributedfiledentry", "${utils_path}:libdistributedfileutils", "//third_party/libfuse:libfuse", ] external_deps = [ "ability_base:want", "common_event_service:cesfwk_innerkits", "hilog:libhilog", "ipc:ipc_single", "relational_store:native_rdb", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] if (!dfs_service_feature_enable_cloud_adapter) { deps += [ "${distributedfile_path}/adapter/cloud_adapter_example:cloud_adapter", ] } else { external_deps += [ "drivekit_native:drivekit" ] } use_exceptions = true part_name = "dfs_service" subsystem_name = "filemanagement" }