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