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_common_config") { 18 visibility = [ ":*" ] 19 include_dirs = [ 20 "include", 21 "include/zidl", 22 "${app_domain_verify_frameworks_common_path}/include", 23 "${app_domain_verify_frameworks_common_path}/include/dfx", 24 ] 25 cflags = [ 26 "-fdata-sections", 27 "-ffunction-sections", 28 "-fstack-protector-strong", 29 "-D_FORTIFY_SOURCE=2", 30 "-Os", 31 ] 32 33 cflags_cc = [ 34 "-fstack-protector-strong", 35 "-Os", 36 ] 37} 38 39ohos_shared_library("app_domain_verify_common") { 40 branch_protector_ret = "pac_ret" 41 sources = [ 42 "src/app_verify_base_info.cpp", 43 "src/bundle_verify_status_info.cpp", 44 "src/common_utils.cpp", 45 "src/skill_uri.cpp", 46 "src/zidl/convert_callback_proxy.cpp", 47 "src/zidl/convert_callback_stub.cpp", 48 ] 49 50 public_configs = [ ":app_domain_verify_common_config" ] 51 version_script = "common.versionscript" 52 53 external_deps = [ 54 "ability_base:want", 55 "c_utils:utils", 56 "hilog:libhilog", 57 "hisysevent:libhisysevent", 58 "ipc:ipc_core", 59 "json:nlohmann_json_static", 60 "safwk:system_ability_fwk", 61 "samgr:samgr_proxy", 62 ] 63 defines = [] 64 if (build_variant == "user") { 65 defines += [ "IS_RELEASE_VERSION" ] 66 } 67 sanitize = { 68 boundary_sanitize = true 69 cfi = true 70 cfi_cross_dso = true 71 debug = false 72 integer_overflow = true 73 ubsan = true 74 } 75 subsystem_name = "bundlemanager" 76 part_name = "app_domain_verify" 77} 78