1# Copyright (c) 2022-2024 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/app_file_service/backup.gni") 16 17config("utils_private_config") { 18 defines = [ 19 "LOG_DOMAIN=0xD004305", 20 "LOG_TAG=\"BackupUtils\"", 21 ] 22} 23 24config("utils_public_config") { 25 include_dirs = [ 26 "include", 27 "include/b_hilog", 28 "${path_base}/include", 29 ] 30} 31 32ohos_static_library("backup_cxx_cppdeps") { 33 branch_protector_ret = "pac_ret" 34 35 sanitize = { 36 integer_overflow = true 37 ubsan = true 38 boundary_sanitize = true 39 cfi = true 40 cfi_cross_dso = true 41 debug = false 42 } 43 44 part_name = "app_file_service" 45 subsystem_name = "filemanagement" 46} 47 48ohos_shared_library("backup_utils") { 49 branch_protector_ret = "pac_ret" 50 51 sanitize = { 52 integer_overflow = true 53 ubsan = true 54 boundary_sanitize = true 55 cfi = true 56 cfi_cross_dso = true 57 debug = false 58 } 59 60 sources = [ 61 "src/b_anony/b_anony.cpp", 62 "src/b_encryption/b_encryption.cpp", 63 "src/b_error/b_error.cpp", 64 "src/b_error/b_excep_utils.cpp", 65 "src/b_filesystem/b_dir.cpp", 66 "src/b_filesystem/b_file.cpp", 67 "src/b_filesystem/b_file_hash.cpp", 68 "src/b_json/b_json_clear_data_config.cpp", 69 "src/b_json/b_json_entity_ext_manage.cpp", 70 "src/b_json/b_json_entity_extension_config.cpp", 71 "src/b_json/b_json_service_disposal_config.cpp", 72 "src/b_json/b_report_entity.cpp", 73 "src/b_jsonutil/b_jsonutil.cpp", 74 "src/b_ohos/startup/backup_para.cpp", 75 "src/b_process/b_guard_cwd.cpp", 76 "src/b_process/b_guard_signal.cpp", 77 "src/b_process/b_process.cpp", 78 "src/b_radar/b_radar.cpp", 79 "src/b_sa/b_sa_utils.cpp", 80 "src/b_tarball/b_tarball_cmdline.cpp", 81 "src/b_tarball/b_tarball_factory.cpp", 82 "src/b_utils/b_time.cpp", 83 ] 84 85 configs = [ ":utils_private_config" ] 86 public_configs = [ ":utils_public_config" ] 87 88 external_deps = [ 89 "access_token:libaccesstoken_sdk", 90 "access_token:libtokenid_sdk", 91 "cJSON:cjson", 92 "c_utils:utils", 93 "faultloggerd:libdfx_dumpcatcher", 94 "hilog:libhilog", 95 "hisysevent:libhisysevent", 96 "hitrace:hitrace_meter", 97 "init:libbegetutil", 98 "ipc:ipc_core", 99 ] 100 101 include_dirs = [ 102 "${path_init}/interfaces/innerkits/include/syspara", 103 "${path_backup}/interfaces/inner_api/native/backup_kit_inner/impl", 104 "${path_backup}/utils/include", 105 ] 106 107 deps = [ 108 ":backup_cxx_cppdeps", 109 "${path_backup}/interfaces/innerkits/native:sandbox_helper_native", 110 "${path_jsoncpp}:jsoncpp", 111 "//third_party/openssl:libcrypto_shared", 112 ] 113 114 use_exceptions = true 115 innerapi_tags = [ "platformsdk" ] 116 part_name = "app_file_service" 117 subsystem_name = "filemanagement" 118} 119