1548bf93fSopenharmony_ci# Copyright (c) 2023 Huawei Device Co., Ltd. 2548bf93fSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3548bf93fSopenharmony_ci# you may not use this file except in compliance with the License. 4548bf93fSopenharmony_ci# You may obtain a copy of the License at 5548bf93fSopenharmony_ci# 6548bf93fSopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7548bf93fSopenharmony_ci# 8548bf93fSopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9548bf93fSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10548bf93fSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11548bf93fSopenharmony_ci# See the License for the specific language governing permissions and 12548bf93fSopenharmony_ci# limitations under the License. 13548bf93fSopenharmony_ci 14548bf93fSopenharmony_ciimport("//build/ohos.gni") 15548bf93fSopenharmony_ciimport("//foundation/bundlemanager/app_domain_verify/app_domain_verify.gni") 16548bf93fSopenharmony_ci 17548bf93fSopenharmony_ciconfig("app_domain_verify_mgr_client_config") { 18548bf93fSopenharmony_ci visibility = [ ":*" ] 19548bf93fSopenharmony_ci include_dirs = [ 20548bf93fSopenharmony_ci "include", 21548bf93fSopenharmony_ci "${app_domain_verify_service_path}/include/manager/core", 22548bf93fSopenharmony_ci "${app_domain_verify_service_path}/include/manager/zidl", 23548bf93fSopenharmony_ci "${app_domain_verify_common_path}/include", 24548bf93fSopenharmony_ci "${app_domain_verify_common_path}/include/zidl", 25548bf93fSopenharmony_ci "${app_domain_verify_frameworks_common_path}/include", 26548bf93fSopenharmony_ci "${app_domain_verify_frameworks_common_path}/include/dfx", 27548bf93fSopenharmony_ci ] 28548bf93fSopenharmony_ci cflags = [ 29548bf93fSopenharmony_ci "-fdata-sections", 30548bf93fSopenharmony_ci "-ffunction-sections", 31548bf93fSopenharmony_ci "-fstack-protector-strong", 32548bf93fSopenharmony_ci "-D_FORTIFY_SOURCE=2", 33548bf93fSopenharmony_ci "-Os", 34548bf93fSopenharmony_ci ] 35548bf93fSopenharmony_ci 36548bf93fSopenharmony_ci cflags_cc = [ "-Os" ] 37548bf93fSopenharmony_ci} 38548bf93fSopenharmony_ci 39548bf93fSopenharmony_ciconfig("app_domain_verify_agent_client_config") { 40548bf93fSopenharmony_ci visibility = [ ":*" ] 41548bf93fSopenharmony_ci include_dirs = [ 42548bf93fSopenharmony_ci "include", 43548bf93fSopenharmony_ci "${app_domain_verify_service_path}/include/agent/core", 44548bf93fSopenharmony_ci "${app_domain_verify_service_path}/include/agent/zidl", 45548bf93fSopenharmony_ci "${app_domain_verify_common_path}/include", 46548bf93fSopenharmony_ci "${app_domain_verify_common_path}/include/zidl", 47548bf93fSopenharmony_ci "${app_domain_verify_frameworks_common_path}/include/dfx", 48548bf93fSopenharmony_ci ] 49548bf93fSopenharmony_ci cflags = [ 50548bf93fSopenharmony_ci "-fdata-sections", 51548bf93fSopenharmony_ci "-ffunction-sections", 52548bf93fSopenharmony_ci "-Os", 53548bf93fSopenharmony_ci ] 54548bf93fSopenharmony_ci if (!app_domain_verify_feature_target_from_cloud) { 55548bf93fSopenharmony_ci cflags += [ "-D_CUT_LINK_CONVERT_" ] 56548bf93fSopenharmony_ci } 57548bf93fSopenharmony_ci cflags_cc = [ "-Os" ] 58548bf93fSopenharmony_ci} 59548bf93fSopenharmony_ci 60548bf93fSopenharmony_ciohos_shared_library("app_domain_verify_mgr_client") { 61548bf93fSopenharmony_ci branch_protector_ret = "pac_ret" 62548bf93fSopenharmony_ci sources = [ 63548bf93fSopenharmony_ci "${app_domain_verify_service_path}/src/manager/zidl/app_domain_verify_mgr_service_proxy.cpp", 64548bf93fSopenharmony_ci "src/app_domain_verify_mgr_client.cpp", 65548bf93fSopenharmony_ci ] 66548bf93fSopenharmony_ci configs = [ ":app_domain_verify_mgr_client_config" ] 67548bf93fSopenharmony_ci public_configs = [ ":app_domain_verify_mgr_client_config" ] 68548bf93fSopenharmony_ci deps = [ "${app_domain_verify_common_path}:app_domain_verify_common" ] 69548bf93fSopenharmony_ci 70548bf93fSopenharmony_ci external_deps = [ 71548bf93fSopenharmony_ci "ability_base:want", 72548bf93fSopenharmony_ci "ability_base:zuri", 73548bf93fSopenharmony_ci "bundle_framework:appexecfwk_base", 74548bf93fSopenharmony_ci "c_utils:utils", 75548bf93fSopenharmony_ci "hilog:libhilog", 76548bf93fSopenharmony_ci "hisysevent:libhisysevent", 77548bf93fSopenharmony_ci "ipc:ipc_core", 78548bf93fSopenharmony_ci "samgr:samgr_proxy", 79548bf93fSopenharmony_ci ] 80548bf93fSopenharmony_ci defines = [] 81548bf93fSopenharmony_ci if (build_variant == "user") { 82548bf93fSopenharmony_ci defines += [ "IS_RELEASE_VERSION" ] 83548bf93fSopenharmony_ci } 84548bf93fSopenharmony_ci version_script = "mgr.versionscript" 85548bf93fSopenharmony_ci sanitize = { 86548bf93fSopenharmony_ci cfi = true 87548bf93fSopenharmony_ci cfi_cross_dso = true 88548bf93fSopenharmony_ci debug = false 89548bf93fSopenharmony_ci } 90548bf93fSopenharmony_ci subsystem_name = "bundlemanager" 91548bf93fSopenharmony_ci part_name = "app_domain_verify" 92548bf93fSopenharmony_ci} 93548bf93fSopenharmony_ci 94548bf93fSopenharmony_ciohos_shared_library("app_domain_verify_agent_client") { 95548bf93fSopenharmony_ci branch_protector_ret = "pac_ret" 96548bf93fSopenharmony_ci sources = [ 97548bf93fSopenharmony_ci "${app_domain_verify_service_path}/src/agent/zidl/app_domain_verify_agent_service_proxy.cpp", 98548bf93fSopenharmony_ci "src/app_domain_verify_agent_client.cpp", 99548bf93fSopenharmony_ci ] 100548bf93fSopenharmony_ci configs = [ ":app_domain_verify_agent_client_config" ] 101548bf93fSopenharmony_ci public_configs = [ ":app_domain_verify_agent_client_config" ] 102548bf93fSopenharmony_ci deps = [ "${app_domain_verify_common_path}:app_domain_verify_common" ] 103548bf93fSopenharmony_ci version_script = "agent.versionscript" 104548bf93fSopenharmony_ci external_deps = [ 105548bf93fSopenharmony_ci "ability_base:want", 106548bf93fSopenharmony_ci "bundle_framework:appexecfwk_base", 107548bf93fSopenharmony_ci "c_utils:utils", 108548bf93fSopenharmony_ci "hilog:libhilog", 109548bf93fSopenharmony_ci "hisysevent:libhisysevent", 110548bf93fSopenharmony_ci "ipc:ipc_core", 111548bf93fSopenharmony_ci "samgr:samgr_proxy", 112548bf93fSopenharmony_ci ] 113548bf93fSopenharmony_ci defines = [] 114548bf93fSopenharmony_ci if (build_variant == "user") { 115548bf93fSopenharmony_ci defines += [ "IS_RELEASE_VERSION" ] 116548bf93fSopenharmony_ci } 117548bf93fSopenharmony_ci sanitize = { 118548bf93fSopenharmony_ci cfi = true 119548bf93fSopenharmony_ci cfi_cross_dso = true 120548bf93fSopenharmony_ci debug = false 121548bf93fSopenharmony_ci } 122548bf93fSopenharmony_ci subsystem_name = "bundlemanager" 123548bf93fSopenharmony_ci part_name = "app_domain_verify" 124548bf93fSopenharmony_ci} 125