• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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  stack_protector_ret = true
19  sanitize = {
20    integer_overflow = true
21    ubsan = true
22    boundary_sanitize = true
23    cfi = true
24    cfi_cross_dso = true
25    debug = false
26  }
27
28  sources = [
29    "src/ext_backup.cpp",
30    "src/ext_backup_js.cpp",
31    "src/ext_backup_loader.cpp",
32    "src/ext_extension.cpp",
33    "src/ext_extension_stub.cpp",
34    "src/tar_file.cpp",
35    "src/untar_file.cpp",
36  ]
37
38  defines = [
39    "LOG_DOMAIN=0xD004301",
40    "LOG_TAG=\"BackupExt\"",
41  ]
42
43  include_dirs = [
44    "include",
45    "${path_napi}/native_engine",
46    "${path_ability_runtime}/services/common/include",
47    "${path_ability_runtime}/interfaces/kits/napi/aafwk/inner/napi_common",
48    "${path_ability_runtime}/interfaces/kits/native/appkit/ability_runtime",
49  ]
50
51  deps = [
52    "${path_backup}/interfaces/inner_api/native/backup_kit_inner:backup_kit_inner",
53    "${path_backup}/utils:backup_utils",
54    "${path_jsoncpp}:jsoncpp",
55  ]
56
57  external_deps = [
58    "ability_base:want",
59    "ability_runtime:ability_context_native",
60    "ability_runtime:abilitykit_native",
61    "ability_runtime:app_context",
62    "ability_runtime:appkit_native",
63    "ability_runtime:runtime",
64    "access_token:libaccesstoken_sdk",
65    "bundle_framework:appexecfwk_core",
66    "c_utils:utils",
67    "hilog:libhilog",
68    "ipc:ipc_core",
69    "napi:ace_napi",
70  ]
71
72  use_exceptions = true
73  relative_install_dir = "extensionability"
74  part_name = "app_file_service"
75  subsystem_name = "filemanagement"
76}
77