# Copyright (c) 2023-2025 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//build/ohos.gni")
import("../../app_domain_verify.gni")
config("app_domain_verify_frameworks_common_config") {
visibility = [ ":*" ]
include_dirs = [
"include",
"include/utils",
"include/httpsession",
"include/bms",
"include/zidl",
"include/config",
"include/dfx",
"include/permission",
]
cflags = [
"-fdata-sections",
"-ffunction-sections",
"-fstack-protector-strong",
"-D_FORTIFY_SOURCE=2",
"-Os",
]
cflags_cc = [
"-fstack-protector-strong",
"-Os",
]
}
ohos_shared_library("app_domain_verify_frameworks_common") {
branch_protector_ret = "pac_ret"
sources = [
"src/bms/bundle_info_query.cpp",
"src/config/white_list_config_mgr.cpp",
"src/httpsession/app_domain_verify_task_mgr.cpp",
"src/httpsession/i_http_task.cpp",
"src/permission/permission_manager.cpp",
"src/utils/critical_utils.cpp",
"src/utils/domain_url_util.cpp",
]
public_configs = [ ":app_domain_verify_frameworks_common_config" ]
version_script = "common.versionscript"
deps = [ "${app_domain_verify_common_path}:app_domain_verify_common" ]
external_deps = [
"ability_base:want",
"ability_base:zuri",
"access_token:libaccesstoken_sdk",
"access_token:libtokenid_sdk",
"bundle_framework:appexecfwk_base",
"bundle_framework:appexecfwk_core",
"cJSON:cjson",
"c_utils:utils",
"ffrt:libffrt",
"hicollie:libhicollie",
"hilog:libhilog",
"hisysevent:libhisysevent",
"ipc:ipc_core",
"memmgr:memmgrclient",
"netstack:http_client",
"os_account:os_account_innerkits",
"preferences:native_preferences",
"safwk:system_ability_fwk",
"samgr:samgr_proxy",
]
defines = []
if (build_variant == "user") {
defines += [ "IS_RELEASE_VERSION" ]
}
sanitize = {
boundary_sanitize = true
cfi = true
cfi_cross_dso = true
debug = false
integer_overflow = true
ubsan = true
}
subsystem_name = "bundlemanager"
part_name = "app_domain_verify"
}