1# Copyright (c) 2025-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("../../user_auth_framework.gni") 16 17config("userauth_service_load_mode_config") { 18 include_dirs = [ "inc" ] 19} 20 21ohos_source_set("userauth_service_load_mode") { 22 sanitize = { 23 integer_overflow = true 24 ubsan = true 25 boundary_sanitize = true 26 cfi = true 27 cfi_cross_dso = true 28 debug = false 29 blocklist = "../../cfi_blocklist.txt" 30 } 31 branch_protector_ret = "pac_ret" 32 33 remove_configs = [ "//build/config/compiler:no_exceptions" ] 34 35 include_dirs = [ "inc" ] 36 37 sources = [ "src/load_mode_handler.cpp" ] 38 39 defines = [] 40 41 if (user_auth_framework_enable_dynamic_load) { 42 sources += [ 43 "src/driver_load_manager.cpp", 44 "src/load_mode_handler_dynamic.cpp", 45 "src/service_unload_manager.cpp", 46 ] 47 defines += [ "ENABLE_DYNAMIC_LOAD" ] 48 } else { 49 sources += [ "src/load_mode_handler_default.cpp" ] 50 } 51 52 deps = [ 53 "../../frameworks/native/client:userauth_client", 54 "../../frameworks/native/common:attributes", 55 "../../frameworks/native/common:dfx", 56 "../../services/base:userauth_service_base", 57 ] 58 59 external_deps = [ 60 "ability_runtime:app_manager", 61 "access_token:libaccesstoken_sdk", 62 "access_token:libtokenid_sdk", 63 "c_utils:utils", 64 "device_manager:devicemanagersdk", 65 "drivers_interface_user_auth:libuser_auth_proxy_4.0", 66 "hdf_core:libhdi", 67 "hilog:libhilog", 68 "hitrace:hitrace_meter", 69 "init:libbegetutil", 70 "ipc:ipc_core", 71 "os_account:os_account_innerkits", 72 "safwk:system_ability_fwk", 73 "samgr:samgr_proxy", 74 ] 75 76 configs = [ 77 "../../common:iam_log_config", 78 "../../common:iam_utils_config", 79 "../core:userauth_service_core_config", 80 ] 81 82 subsystem_name = "useriam" 83 part_name = "user_auth_framework" 84} 85