# Copyright (C) 2023-2024 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") config("optimize-size") { cflags = [ "-fdata-sections", "-ffunction-sections", "-Oz", ] cflags_cc = [ "-fvisibility-inlines-hidden", "-Oz", ] } ohos_shared_library("cloudfiledaemon") { branch_protector_ret = "pac_ret" configs = [ ":optimize-size" ] sanitize = { integer_overflow = true 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/cloud_daemon_statistic.cpp", "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", "${utils_path}/cloud_disk/include", "${utils_path}/dentry/include", "${utils_path}/log/include", "${utils_path}/system/include", "${innerkits_native_path}/cloud_daemon_kit_inner", "${innerkits_native_path}/cloud_file_kit_inner/big_data_statistics", "${services_path}/cloudfiledaemon/include/cloud_disk/", "${services_path}/cloudfiledaemon/include/fuse_manager/", "${services_path}/cloudfiledaemon/include/ipc/", "${services_path}/cloudsyncservice/include/data_sync/", "${clouddisk_database_path}/include", ] deps = [ "${clouddisk_database_path}:clouddisk_database", "${innerkits_native_path}/cloud_file_kit_inner:cloudfile_kit_core", "${utils_path}:libdistributedfileutils_lite", ] external_deps = [ "ability_base:want", "ability_runtime:dataobs_manager", "c_utils:utils", "common_event_service:cesfwk_innerkits", "ffrt:libffrt", "hilog:libhilog", "hisysevent:libhisysevent", "hitrace:hitrace_meter", "init:libbegetutil", "ipc:ipc_single", "libfuse:libfuse", "relational_store:native_rdb", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] if (cloudsync_service_hicollie_enable) { external_deps += [ "hicollie:libhicollie" ] defines += [ "HICOLLIE_ENABLE" ] } use_exceptions = true part_name = "dfs_service" subsystem_name = "filemanagement" }