1# Copyright (c) 2021-2022 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("//build/ohos_var.gni") 16import("../../../config.gni") 17 18config("samgr_proxy_config") { 19 include_dirs = [ "include" ] 20} 21 22config("lsamgr_proxy_config") { 23 include_dirs = 24 [ "//foundation/systemabilitymgr/samgr/services/lsamgr/include" ] 25} 26 27config("samgr_proxy_private_config") { 28 include_dirs = [ 29 "include", 30 "//foundation/systemabilitymgr/samgr/interfaces/innerkits/lsamgr", 31 "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/include", 32 "//foundation/systemabilitymgr/samgr/services/lsamgr/include", 33 "//foundation/systemabilitymgr/samgr/services/samgr/native/include", 34 "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache/include", 35 "//foundation/systemabilitymgr/samgr/utils/native/include", 36 ] 37} 38 39ohos_shared_library("samgr_proxy") { 40 sanitize = { 41 cfi = true 42 cfi_cross_dso = true 43 debug = false 44 cfi_no_nvcall = true 45 blocklist = "../../../cfi_blocklist.txt" 46 } 47 branch_protector_ret = "pac_ret" 48 49 version_script = "libsamgr_proxy.versionscript" 50 defines = [ "SAMGR_PROXY" ] 51 sources = [ 52 "//foundation/systemabilitymgr/samgr/frameworks/native/source/system_ability_load_callback_stub.cpp", 53 "//foundation/systemabilitymgr/samgr/frameworks/native/source/system_ability_manager_proxy.cpp", 54 "//foundation/systemabilitymgr/samgr/frameworks/native/source/system_ability_on_demand_event.cpp", 55 "//foundation/systemabilitymgr/samgr/frameworks/native/source/system_ability_status_change_stub.cpp", 56 "//foundation/systemabilitymgr/samgr/frameworks/native/source/system_process_status_change_stub.cpp", 57 "//foundation/systemabilitymgr/samgr/services/lsamgr/src/local_ability_manager_proxy.cpp", 58 "//foundation/systemabilitymgr/samgr/services/lsamgr/src/local_abilitys.cpp", 59 "//foundation/systemabilitymgr/samgr/services/samgr/native/source/service_registry.cpp", 60 ] 61 configs = [ 62 ":samgr_proxy_private_config", 63 "//foundation/systemabilitymgr/samgr/test/resource:coverage_flags", 64 ] 65 66 deps = [ "//foundation/systemabilitymgr/samgr/interfaces/innerkits/dynamic_cache:dynamic_cache" ] 67 68 public_configs = [ 69 ":lsamgr_proxy_config", 70 ":samgr_proxy_config", 71 ] 72 all_dependent_configs = [ ":samgr_proxy_config" ] 73 74 if (is_standard_system) { 75 external_deps = [ 76 "c_utils:utils", 77 "hilog:libhilog", 78 "init:libbegetutil", 79 "ipc:ipc_single", 80 "json:nlohmann_json_static", 81 ] 82 83 if (samgr_enable_extend_load_timeout) { 84 defines += [ "SAMGR_ENABLE_EXTEND_LOAD_TIMEOUT" ] 85 } 86 part_name = "samgr" 87 } 88 89 innerapi_tags = [ 90 "chipsetsdk", 91 "platformsdk", 92 "sasdk", 93 ] 94 install_images = [ 95 system_base_dir, 96 updater_base_dir, 97 ] 98 subsystem_name = "systemabilitymgr" 99} 100