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
17ohos_shared_library("backup_sa") {
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/module_app_gallery/app_gallery_dispose_proxy.cpp",
31    "src/module_external/bms_adapter.cpp",
32    "src/module_external/sms_adapter.cpp",
33    "src/module_ipc/sa_backup_connection.cpp",
34    "src/module_ipc/service.cpp",
35    "src/module_ipc/service_incremental.cpp",
36    "src/module_ipc/service_incremental_reverse_proxy.cpp",
37    "src/module_ipc/service_reverse_proxy.cpp",
38    "src/module_ipc/service_stub.cpp",
39    "src/module_ipc/sub_service.cpp",
40    "src/module_ipc/svc_backup_connection.cpp",
41    "src/module_ipc/svc_extension_incremental_proxy.cpp",
42    "src/module_ipc/svc_extension_proxy.cpp",
43    "src/module_ipc/svc_restore_deps_manager.cpp",
44    "src/module_ipc/svc_session_manager.cpp",
45    "src/module_notify/notify_work_service.cpp",
46    "src/module_sched/sched_scheduler.cpp",
47  ]
48
49  defines = [
50    "LOG_DOMAIN=0xD004303",
51    "LOG_TAG=\"BackupSA\"",
52  ]
53
54  include_dirs = [
55    "include",
56    "include/module_notify",
57  ]
58
59  deps = [
60    "${path_backup}/interfaces/inner_api/native/backup_kit_inner:backup_kit_inner",
61    "${path_backup}/utils:backup_utils",
62    "${path_jsoncpp}:jsoncpp",
63  ]
64
65  external_deps = [
66    "ability_base:want",
67    "ability_runtime:ability_manager",
68    "access_token:libaccesstoken_sdk",
69    "access_token:libtokenid_sdk",
70    "bundle_framework:appexecfwk_base",
71    "bundle_framework:appexecfwk_core",
72    "c_utils:utils",
73    "common_event_service:cesfwk_innerkits",
74    "hilog:libhilog",
75    "hisysevent:libhisysevent",
76    "hitrace:hitrace_meter",
77    "init:libbegetutil",
78    "ipc:ipc_core",
79    "safwk:system_ability_fwk",
80    "samgr:samgr_proxy",
81    "storage_service:storage_manager_sa_proxy",
82  ]
83
84  use_exceptions = true
85  part_name = "app_file_service"
86  subsystem_name = "filemanagement"
87}
88