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_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 ] 28 cflags = [ 29 "-fdata-sections", 30 "-ffunction-sections", 31 "-fstack-protector-strong", 32 "-D_FORTIFY_SOURCE=2", 33 "-Os", 34 ] 35 36 cflags_cc = [ "-Os" ] 37} 38 39ohos_shared_library("app_domain_verify_frameworks_common") { 40 branch_protector_ret = "pac_ret" 41 sources = [ 42 "src/bms/bundle_info_query.cpp", 43 "src/config/white_list_config_mgr.cpp", 44 "src/httpsession/app_domain_verify_task_mgr.cpp", 45 "src/httpsession/i_http_task.cpp", 46 "src/utils/domain_url_util.cpp", 47 ] 48 49 public_configs = [ ":app_domain_verify_frameworks_common_config" ] 50 version_script = "common.versionscript" 51 deps = [ "${app_domain_verify_common_path}:app_domain_verify_common" ] 52 external_deps = [ 53 "ability_base:want", 54 "ability_base:zuri", 55 "bundle_framework:appexecfwk_base", 56 "bundle_framework:appexecfwk_core", 57 "c_utils:utils", 58 "ffrt:libffrt", 59 "hicollie:libhicollie", 60 "hilog:libhilog", 61 "hisysevent:libhisysevent", 62 "ipc:ipc_core", 63 "json:nlohmann_json_static", 64 "netstack:http_client", 65 "os_account:os_account_innerkits", 66 "preferences:native_preferences", 67 "safwk:system_ability_fwk", 68 "samgr:samgr_proxy", 69 ] 70 defines = [] 71 if (build_variant == "user") { 72 defines += [ "IS_RELEASE_VERSION" ] 73 } 74 sanitize = { 75 cfi = true 76 cfi_cross_dso = true 77 debug = false 78 } 79 subsystem_name = "bundlemanager" 80 part_name = "app_domain_verify" 81} 82