1# Copyright (c) 2022-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/app_file_service/backup.gni") 16 17ohos_shared_library("backup_extension_ability_native") { 18 branch_protector_ret = "pac_ret" 19 20 sanitize = { 21 integer_overflow = true 22 ubsan = true 23 boundary_sanitize = true 24 cfi = true 25 cfi_cross_dso = true 26 debug = false 27 } 28 29 sources = [ 30 "src/ext_backup.cpp", 31 "src/ext_backup_ani.cpp", 32 "src/ext_backup_context.cpp", 33 "src/ext_backup_context_js.cpp", 34 "src/ext_backup_js.cpp", 35 "src/ext_backup_loader.cpp", 36 "src/ext_extension.cpp", 37 "src/installd_un_tar_file.cpp", 38 "src/sub_ext_extension.cpp", 39 "src/tar_file.cpp", 40 "src/untar_file.cpp", 41 ] 42 43 defines = [ 44 "LOG_DOMAIN=0xD004303", 45 "LOG_TAG=\"BackupExt\"", 46 ] 47 48 include_dirs = [ "include" ] 49 50 public_configs = [ "${path_backup}/services/backup_sa:public_idl_config" ] 51 52 deps = [ 53 "${path_backup}/interfaces/inner_api/native/backup_kit_inner:backup_kit_inner", 54 "${path_backup}/interfaces/innerkits/native:sandbox_helper_native", 55 "${path_backup}/services/backup_sa:backup_extension_stub_idl", 56 "${path_backup}/utils:backup_utils", 57 ] 58 59 external_deps = [ 60 "ability_base:want", 61 "ability_runtime:ability_context_native", 62 "ability_runtime:abilitykit_native", 63 "ability_runtime:ani_common", 64 "ability_runtime:app_context", 65 "ability_runtime:appkit_native", 66 "ability_runtime:extensionkit_native", 67 "ability_runtime:napi_common", 68 "ability_runtime:runtime", 69 "access_token:libaccesstoken_sdk", 70 "bundle_framework:appexecfwk_core", 71 "c_utils:utils", 72 "hilog:libhilog", 73 "hitrace:hitrace_meter", 74 "ipc:ipc_core", 75 "ipc:ipc_napi", 76 "jsoncpp:jsoncpp", 77 "napi:ace_napi", 78 "runtime_core:ani", 79 "samgr:samgr_proxy", 80 ] 81 82 cflags_cc = [ 83 "-fdata-sections", 84 "-ffunction-sections", 85 "-fno-unwind-tables", 86 "-fno-asynchronous-unwind-tables", 87 "-Os", 88 "-fvisibility=hidden", 89 ] 90 91 use_exceptions = true 92 relative_install_dir = "extensionability" 93 part_name = "app_file_service" 94 subsystem_name = "filemanagement" 95} 96