1# Copyright (c) 2023-2025 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_frameworks_common_config") { 18 visibility = [ ":*" ] 19 include_dirs = [ 20 "include", 21 "include/utils", 22 "include/httpsession", 23 "include/bms", 24 "include/zidl", 25 "include/config", 26 "include/dfx", 27 "include/permission", 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 43ohos_shared_library("app_domain_verify_frameworks_common") { 44 branch_protector_ret = "pac_ret" 45 sources = [ 46 "src/bms/bundle_info_query.cpp", 47 "src/config/white_list_config_mgr.cpp", 48 "src/httpsession/app_domain_verify_task_mgr.cpp", 49 "src/httpsession/i_http_task.cpp", 50 "src/permission/permission_manager.cpp", 51 "src/utils/critical_utils.cpp", 52 "src/utils/domain_url_util.cpp", 53 ] 54 55 public_configs = [ ":app_domain_verify_frameworks_common_config" ] 56 version_script = "common.versionscript" 57 deps = [ "${app_domain_verify_common_path}:app_domain_verify_common" ] 58 external_deps = [ 59 "ability_base:want", 60 "ability_base:zuri", 61 "access_token:libaccesstoken_sdk", 62 "access_token:libtokenid_sdk", 63 "bundle_framework:appexecfwk_base", 64 "bundle_framework:appexecfwk_core", 65 "cJSON:cjson", 66 "c_utils:utils", 67 "ffrt:libffrt", 68 "hicollie:libhicollie", 69 "hilog:libhilog", 70 "hisysevent:libhisysevent", 71 "ipc:ipc_core", 72 "memmgr:memmgrclient", 73 "netstack:http_client", 74 "os_account:os_account_innerkits", 75 "preferences:native_preferences", 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