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