1# Copyright (c) 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("../../../app_domain_verify.gni") 16 17config("app_domain_verify_mgr_client_config") { 18 visibility = [ ":*" ] 19 include_dirs = [ 20 "include", 21 "${app_domain_verify_client_path}/include/sa_interface", 22 "${app_domain_verify_service_path}/include/manager/core", 23 "${app_domain_verify_service_path}/include/manager/zidl", 24 "${app_domain_verify_common_path}/include", 25 "${app_domain_verify_common_path}/include/zidl", 26 "${app_domain_verify_frameworks_common_path}/include", 27 "${app_domain_verify_frameworks_common_path}/include/dfx", 28 "${app_domain_verify_frameworks_common_path}/include/bms", 29 ] 30 cflags = [ 31 "-fdata-sections", 32 "-ffunction-sections", 33 "-fstack-protector-strong", 34 "-D_FORTIFY_SOURCE=2", 35 "-Os", 36 ] 37 38 cflags_cc = [ 39 "-fstack-protector-strong", 40 "-Os", 41 ] 42} 43 44config("app_domain_verify_agent_client_config") { 45 visibility = [ ":*" ] 46 include_dirs = [ 47 "include", 48 "${app_domain_verify_client_path}/include/sa_interface", 49 "${app_domain_verify_service_path}/include/agent/core", 50 "${app_domain_verify_service_path}/include/agent/zidl", 51 "${app_domain_verify_common_path}/include", 52 "${app_domain_verify_common_path}/include/zidl", 53 "${app_domain_verify_frameworks_common_path}/include/dfx", 54 ] 55 cflags = [ 56 "-fdata-sections", 57 "-ffunction-sections", 58 "-Os", 59 "-fstack-protector-strong", 60 ] 61 if (!app_domain_verify_feature_target_from_cloud) { 62 cflags += [ "-D_CUT_LINK_CONVERT_" ] 63 } 64 65 cflags_cc = [ 66 "-fstack-protector-strong", 67 "-Os", 68 ] 69} 70 71ohos_shared_library("app_domain_verify_mgr_client") { 72 branch_protector_ret = "pac_ret" 73 sources = [ 74 "${app_domain_verify_frameworks_common_path}/src/bms/bundle_info_query.cpp", 75 "${app_domain_verify_service_path}/src/manager/zidl/app_domain_verify_mgr_service_proxy.cpp", 76 "src/app_domain_verify_mgr_client.cpp", 77 ] 78 configs = [ ":app_domain_verify_mgr_client_config" ] 79 public_configs = [ ":app_domain_verify_mgr_client_config" ] 80 deps = [ "${app_domain_verify_common_path}:app_domain_verify_common" ] 81 82 external_deps = [ 83 "ability_base:want", 84 "ability_base:zuri", 85 "bundle_framework:appexecfwk_base", 86 "bundle_framework:appexecfwk_core", 87 "c_utils:utils", 88 "hilog:libhilog", 89 "hisysevent:libhisysevent", 90 "ipc:ipc_core", 91 "os_account:os_account_innerkits", 92 "samgr:samgr_proxy", 93 ] 94 defines = [] 95 if (build_variant == "user") { 96 defines += [ "IS_RELEASE_VERSION" ] 97 } 98 version_script = "mgr.versionscript" 99 sanitize = { 100 boundary_sanitize = true 101 cfi = true 102 cfi_cross_dso = true 103 debug = false 104 integer_overflow = true 105 ubsan = true 106 } 107 subsystem_name = "bundlemanager" 108 part_name = "app_domain_verify" 109} 110 111ohos_shared_library("app_domain_verify_agent_client") { 112 branch_protector_ret = "pac_ret" 113 sources = [ 114 "${app_domain_verify_service_path}/src/agent/zidl/app_domain_verify_agent_service_proxy.cpp", 115 "src/app_domain_verify_agent_client.cpp", 116 ] 117 configs = [ ":app_domain_verify_agent_client_config" ] 118 public_configs = [ ":app_domain_verify_agent_client_config" ] 119 deps = [ "${app_domain_verify_common_path}:app_domain_verify_common" ] 120 version_script = "agent.versionscript" 121 external_deps = [ 122 "ability_base:want", 123 "bundle_framework:appexecfwk_base", 124 "c_utils:utils", 125 "hilog:libhilog", 126 "hisysevent:libhisysevent", 127 "ipc:ipc_core", 128 "samgr:samgr_proxy", 129 ] 130 defines = [] 131 if (build_variant == "user") { 132 defines += [ "IS_RELEASE_VERSION" ] 133 } 134 sanitize = { 135 boundary_sanitize = true 136 cfi = true 137 cfi_cross_dso = true 138 debug = false 139 integer_overflow = true 140 ubsan = true 141 } 142 subsystem_name = "bundlemanager" 143 part_name = "app_domain_verify" 144} 145