1cb7eb8c9Sopenharmony_ci# Copyright (c) 2024 Huawei Device Co., Ltd. 2cb7eb8c9Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3cb7eb8c9Sopenharmony_ci# you may not use this file except in compliance with the License. 4cb7eb8c9Sopenharmony_ci# You may obtain a copy of the License at 5cb7eb8c9Sopenharmony_ci# 6cb7eb8c9Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7cb7eb8c9Sopenharmony_ci# 8cb7eb8c9Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9cb7eb8c9Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10cb7eb8c9Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11cb7eb8c9Sopenharmony_ci# See the License for the specific language governing permissions and 12cb7eb8c9Sopenharmony_ci# limitations under the License. 13cb7eb8c9Sopenharmony_ci 14cb7eb8c9Sopenharmony_ciimport("//build/ohos.gni") 15cb7eb8c9Sopenharmony_ciimport("//foundation/filemanagement/dfs_service/distributedfile.gni") 16cb7eb8c9Sopenharmony_ci 17cb7eb8c9Sopenharmony_ciconfig("optimize-size") { 18cb7eb8c9Sopenharmony_ci cflags = [ 19cb7eb8c9Sopenharmony_ci "-fdata-sections", 20cb7eb8c9Sopenharmony_ci "-ffunction-sections", 21cb7eb8c9Sopenharmony_ci "-Oz", 22cb7eb8c9Sopenharmony_ci ] 23cb7eb8c9Sopenharmony_ci cflags_cc = [ 24cb7eb8c9Sopenharmony_ci "-fvisibility-inlines-hidden", 25cb7eb8c9Sopenharmony_ci "-Oz", 26cb7eb8c9Sopenharmony_ci ] 27cb7eb8c9Sopenharmony_ci} 28cb7eb8c9Sopenharmony_ci 29cb7eb8c9Sopenharmony_ciohos_shared_library("cloudsync") { 30cb7eb8c9Sopenharmony_ci branch_protector_ret = "pac_ret" 31cb7eb8c9Sopenharmony_ci configs = [ ":optimize-size" ] 32cb7eb8c9Sopenharmony_ci sanitize = { 33cb7eb8c9Sopenharmony_ci integer_overflow = true 34cb7eb8c9Sopenharmony_ci ubsan = true 35cb7eb8c9Sopenharmony_ci boundary_sanitize = true 36cb7eb8c9Sopenharmony_ci cfi = true 37cb7eb8c9Sopenharmony_ci cfi_cross_dso = true 38cb7eb8c9Sopenharmony_ci debug = false 39cb7eb8c9Sopenharmony_ci } 40cb7eb8c9Sopenharmony_ci sources = [ 41cb7eb8c9Sopenharmony_ci "cloud_file_cache_napi.cpp", 42cb7eb8c9Sopenharmony_ci "cloud_file_download_napi.cpp", 43cb7eb8c9Sopenharmony_ci "cloud_file_napi.cpp", 44cb7eb8c9Sopenharmony_ci "cloud_sync_n_exporter.cpp", 45cb7eb8c9Sopenharmony_ci "cloud_sync_napi.cpp", 46cb7eb8c9Sopenharmony_ci "file_sync_napi.cpp", 47cb7eb8c9Sopenharmony_ci "gallery_sync_napi.cpp", 48cb7eb8c9Sopenharmony_ci ] 49cb7eb8c9Sopenharmony_ci deps = [ 50cb7eb8c9Sopenharmony_ci "${innerkits_native_path}/cloudsync_kit_inner:cloudsync_kit_inner", 51cb7eb8c9Sopenharmony_ci "${utils_path}:libdistributedfileutils", 52cb7eb8c9Sopenharmony_ci ] 53cb7eb8c9Sopenharmony_ci 54cb7eb8c9Sopenharmony_ci external_deps = [ 55cb7eb8c9Sopenharmony_ci "ability_base:zuri", 56cb7eb8c9Sopenharmony_ci "ability_runtime:dataobs_manager", 57cb7eb8c9Sopenharmony_ci "c_utils:utils", 58cb7eb8c9Sopenharmony_ci "file_api:filemgmt_libhilog", 59cb7eb8c9Sopenharmony_ci "file_api:filemgmt_libn", 60cb7eb8c9Sopenharmony_ci "hilog:libhilog", 61cb7eb8c9Sopenharmony_ci "ipc:ipc_single", 62cb7eb8c9Sopenharmony_ci "napi:ace_napi", 63cb7eb8c9Sopenharmony_ci ] 64cb7eb8c9Sopenharmony_ci 65cb7eb8c9Sopenharmony_ci defines = [ 66cb7eb8c9Sopenharmony_ci "LOG_DOMAIN=0xD004309", 67cb7eb8c9Sopenharmony_ci "LOG_TAG=\"CLOUD_FILE_SYNC\"", 68cb7eb8c9Sopenharmony_ci ] 69cb7eb8c9Sopenharmony_ci 70cb7eb8c9Sopenharmony_ci relative_install_dir = "module/file" 71cb7eb8c9Sopenharmony_ci 72cb7eb8c9Sopenharmony_ci part_name = "dfs_service" 73cb7eb8c9Sopenharmony_ci subsystem_name = "filemanagement" 74cb7eb8c9Sopenharmony_ci} 75