# Copyright (c) 2022-2023 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/app_file_service/backup.gni") ohos_shared_library("backup_extension_ability_native") { branch_protector_ret = "pac_ret" sanitize = { integer_overflow = true ubsan = true boundary_sanitize = true cfi = true cfi_cross_dso = true debug = false } sources = [ "src/ext_backup.cpp", "src/ext_backup_context.cpp", "src/ext_backup_context_js.cpp", "src/ext_backup_js.cpp", "src/ext_backup_loader.cpp", "src/ext_extension.cpp", "src/ext_extension_stub.cpp", "src/sub_ext_extension.cpp", "src/tar_file.cpp", "src/untar_file.cpp", ] defines = [ "LOG_DOMAIN=0xD004301", "LOG_TAG=\"BackupExt\"", ] include_dirs = [ "include", "${path_napi}/native_engine", "${path_ability_runtime}/services/common/include", "${path_ability_runtime}/interfaces/kits/napi/aafwk/inner/napi_common", "${path_ability_runtime}/interfaces/kits/native/appkit/ability_runtime", ] deps = [ "${path_backup}/interfaces/inner_api/native/backup_kit_inner:backup_kit_inner", "${path_backup}/interfaces/innerkits/native:sandbox_helper_native", "${path_backup}/utils:backup_utils", "${path_jsoncpp}:jsoncpp", ] external_deps = [ "ability_base:want", "ability_runtime:ability_context_native", "ability_runtime:abilitykit_native", "ability_runtime:app_context", "ability_runtime:appkit_native", "ability_runtime:runtime", "access_token:libaccesstoken_sdk", "bundle_framework:appexecfwk_core", "c_utils:utils", "hilog:libhilog", "hitrace:hitrace_meter", "ipc:ipc_core", "napi:ace_napi", ] use_exceptions = true relative_install_dir = "extensionability" part_name = "app_file_service" subsystem_name = "filemanagement" }