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_agent_verifier_config") { 18 visibility = [ ":*" ] 19 include_dirs = [ 20 "include", 21 "include/constant", 22 "${app_domain_verify_common_path}/include", 23 "${app_domain_verify_frameworks_common_path}/include", 24 "${app_domain_verify_frameworks_common_path}/include/httpsession", 25 "${app_domain_verify_frameworks_common_path}/include/utils", 26 "${app_domain_verify_frameworks_common_path}/include/bms", 27 ] 28 configs = [ "//build/config/compiler:exceptions" ] 29 ldflags = [ "-Wl,--exclude-libs=ALL" ] 30 cflags = [ 31 "-fdata-sections", 32 "-ffunction-sections", 33 "-fstack-protector-strong", 34 "-D_FORTIFY_SOURCE=2", 35 "-Os", 36 ] 37 38 cflags_cc = [ "-Os" ] 39} 40 41ohos_shared_library("app_domain_verify_agent_verifier") { 42 branch_protector_ret = "pac_ret" 43 sources = [ 44 "src/domain_json_util.cpp", 45 "src/domain_verifier.cpp", 46 "src/verify_http_task.cpp", 47 "src/verify_task.cpp", 48 ] 49 public_configs = [ ":app_domain_verify_agent_verifier_config" ] 50 deps = [ 51 "${app_domain_verify_client_path}:app_domain_verify_mgr_client", 52 "${app_domain_verify_common_path}:app_domain_verify_common", 53 "${app_domain_verify_frameworks_common_path}:app_domain_verify_frameworks_common", 54 ] 55 version_script = "verifier.versionscript" 56 57 external_deps = [ 58 "ability_base:base", 59 "ability_base:want", 60 "ability_runtime:ability_manager", 61 "bundle_framework:appexecfwk_base", 62 "bundle_framework:appexecfwk_core", 63 "c_utils:utils", 64 "curl:curl_shared", 65 "eventhandler:libeventhandler", 66 "ffrt:libffrt", 67 "hilog:libhilog", 68 "hisysevent:libhisysevent", 69 "ipc:ipc_core", 70 "json:nlohmann_json_static", 71 "netstack:http_client", 72 "os_account:os_account_innerkits", 73 "safwk:system_ability_fwk", 74 "samgr:samgr_proxy", 75 ] 76 defines = [] 77 if (build_variant == "user") { 78 defines += [ "IS_RELEASE_VERSION" ] 79 } 80 sanitize = { 81 cfi = true 82 cfi_cross_dso = true 83 debug = false 84 } 85 subsystem_name = "bundlemanager" 86 part_name = "app_domain_verify" 87} 88