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_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 = [ 39 "-fstack-protector-strong", 40 "-Os", 41 ] 42} 43 44ohos_shared_library("app_domain_verify_agent_verifier") { 45 branch_protector_ret = "pac_ret" 46 sources = [ 47 "src/domain_json_util.cpp", 48 "src/domain_verifier.cpp", 49 "src/verify_http_task.cpp", 50 "src/verify_task.cpp", 51 ] 52 public_configs = [ ":app_domain_verify_agent_verifier_config" ] 53 deps = [ 54 "${app_domain_verify_client_path}:app_domain_verify_mgr_client", 55 "${app_domain_verify_common_path}:app_domain_verify_common", 56 "${app_domain_verify_frameworks_common_path}:app_domain_verify_frameworks_common", 57 ] 58 version_script = "verifier.versionscript" 59 60 external_deps = [ 61 "ability_base:base", 62 "ability_base:want", 63 "ability_runtime:ability_manager", 64 "bundle_framework:appexecfwk_base", 65 "bundle_framework:appexecfwk_core", 66 "c_utils:utils", 67 "curl:curl_shared", 68 "eventhandler:libeventhandler", 69 "ffrt:libffrt", 70 "hilog:libhilog", 71 "hisysevent:libhisysevent", 72 "ipc:ipc_core", 73 "json:nlohmann_json_static", 74 "netstack:http_client", 75 "os_account:os_account_innerkits", 76 "safwk:system_ability_fwk", 77 "samgr:samgr_proxy", 78 ] 79 defines = [] 80 if (build_variant == "user") { 81 defines += [ "IS_RELEASE_VERSION" ] 82 } 83 sanitize = { 84 boundary_sanitize = true 85 cfi = true 86 cfi_cross_dso = true 87 debug = false 88 integer_overflow = true 89 ubsan = true 90 } 91 subsystem_name = "bundlemanager" 92 part_name = "app_domain_verify" 93} 94