1# Copyright (C) 2024 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") 16config("app_domain_verify_mgr_napi_config") { 17 visibility = [ ":*" ] 18 include_dirs = [ 19 "include", 20 "${app_domain_verify_client_path}/include", 21 "${app_domain_verify_common_path}/include", 22 "${app_domain_verify_common_path}/include/zidl", 23 "${app_domain_verify_kits_path}/common/include", 24 ] 25 configs = [ "//build/config/compiler:exceptions" ] 26 ldflags = [ "-Wl,--exclude-libs=ALL" ] 27 cflags = [ 28 "-fvisibility=hidden", 29 "-fdata-sections", 30 "-ffunction-sections", 31 "-fstack-protector-strong", 32 "-D_FORTIFY_SOURCE=2", 33 "-Os", 34 ] 35 36 cflags_cc = [ 37 "-fvisibility-inlines-hidden", 38 "-Os", 39 ] 40} 41 42ohos_shared_library("appdomainverify_napi") { 43 branch_protector_ret = "pac_ret" 44 45 sanitize = { 46 boundary_sanitize = true 47 cfi = true 48 cfi_cross_dso = true 49 debug = false 50 integer_overflow = true 51 ubsan = true 52 } 53 54 sources = [ 55 "${app_domain_verify_kits_path}/common/src/api_event_reporter.cpp", 56 "${app_domain_verify_kits_path}/common/src/config_parser.cpp", 57 "src/app_domain_verify_manager_napi.cpp", 58 "src/native_module.cpp", 59 ] 60 public_configs = [ ":app_domain_verify_mgr_napi_config" ] 61 deps = [ 62 "${app_domain_verify_client_path}:app_domain_verify_mgr_client", 63 "${app_domain_verify_common_path}:app_domain_verify_common", 64 ] 65 external_deps = [ 66 "ability_base:want", 67 "bundle_framework:appexecfwk_base", 68 "c_utils:utils", 69 "hiappevent:hiappevent_innerapi", 70 "hilog:libhilog", 71 "ipc:ipc_core", 72 "napi:ace_napi", 73 "safwk:system_ability_fwk", 74 "samgr:samgr_proxy", 75 ] 76 defines = [] 77 if (build_variant == "user") { 78 defines += [ "IS_RELEASE_VERSION" ] 79 } 80 81 relative_install_dir = "module/bundle" 82 subsystem_name = "bundlemanager" 83 part_name = "app_domain_verify" 84} 85