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_context.cpp", 32 "src/ext_backup_context_js.cpp", 33 "src/ext_backup_js.cpp", 34 "src/ext_backup_loader.cpp", 35 "src/ext_extension.cpp", 36 "src/ext_extension_stub.cpp", 37 "src/sub_ext_extension.cpp", 38 "src/tar_file.cpp", 39 "src/untar_file.cpp", 40 ] 41 42 defines = [ 43 "LOG_DOMAIN=0xD004301", 44 "LOG_TAG=\"BackupExt\"", 45 ] 46 47 include_dirs = [ 48 "include", 49 "${path_napi}/native_engine", 50 "${path_ability_runtime}/services/common/include", 51 "${path_ability_runtime}/interfaces/kits/napi/aafwk/inner/napi_common", 52 "${path_ability_runtime}/interfaces/kits/native/appkit/ability_runtime", 53 ] 54 55 deps = [ 56 "${path_backup}/interfaces/inner_api/native/backup_kit_inner:backup_kit_inner", 57 "${path_backup}/interfaces/innerkits/native:sandbox_helper_native", 58 "${path_backup}/utils:backup_utils", 59 "${path_jsoncpp}:jsoncpp", 60 ] 61 62 external_deps = [ 63 "ability_base:want", 64 "ability_runtime:ability_context_native", 65 "ability_runtime:abilitykit_native", 66 "ability_runtime:app_context", 67 "ability_runtime:appkit_native", 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 "napi:ace_napi", 76 ] 77 78 use_exceptions = true 79 relative_install_dir = "extensionability" 80 part_name = "app_file_service" 81 subsystem_name = "filemanagement" 82} 83