1# Copyright (c) 2022-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") 15 16if (!defined(global_parts_info) || 17 defined(global_parts_info.account_os_account)) { 18 has_os_account_part = true 19} else { 20 has_os_account_part = false 21} 22 23config("userauth_service_core_config") { 24 include_dirs = [ 25 "inc", 26 "src", 27 "../context/inc", 28 "../ipc/inc", 29 ] 30} 31 32ohos_source_set("userauth_service_core") { 33 sanitize = { 34 integer_overflow = true 35 ubsan = true 36 boundary_sanitize = true 37 cfi = true 38 cfi_cross_dso = true 39 debug = false 40 blocklist = "../../cfi_blocklist.txt" 41 } 42 branch_protector_ret = "pac_ret" 43 include_dirs = [ 44 "inc", 45 "src", 46 ] 47 48 remove_configs = [ "//build/config/compiler:no_exceptions" ] 49 50 sources = [ 51 "src/auth_widget_helper.cpp", 52 "src/authentication_impl.cpp", 53 "src/credential_info_impl.cpp", 54 "src/enrolled_info_impl.cpp", 55 "src/enrollment_impl.cpp", 56 "src/identification_impl.cpp", 57 "src/resource_node_impl.cpp", 58 "src/resource_node_pool_impl.cpp", 59 "src/resource_node_utils.cpp", 60 "src/schedule_node_builder.cpp", 61 "src/schedule_node_helper.cpp", 62 "src/schedule_node_impl.cpp", 63 "src/secure_user_info_impl.cpp", 64 "src/system_param_manager.cpp", 65 "src/template_cache_manager.cpp", 66 "src/user_idm_database_impl.cpp", 67 "src/user_idm_session_controller_impl.cpp", 68 "src/user_info_impl.cpp", 69 "src/widget_schedule_node_impl.cpp", 70 ] 71 72 deps = [ 73 "../../frameworks/native/common:attributes", 74 "../../frameworks/native/common:dfx", 75 "../../services/base:userauth_service_base", 76 ] 77 78 external_deps = [ 79 "c_utils:utils", 80 "drivers_interface_user_auth:libuser_auth_proxy_1.2", 81 "hilog:libhilog", 82 "hitrace:hitrace_meter", 83 "init:libbegetutil", 84 "ipc:ipc_core", 85 "safwk:system_ability_fwk", 86 "samgr:samgr_proxy", 87 ] 88 89 if (has_os_account_part) { 90 cflags_cc = [ "-DHAS_OS_ACCOUNT_PART" ] 91 external_deps += [ "os_account:os_account_innerkits" ] 92 } 93 94 public_configs = [ ":userauth_service_core_config" ] 95 96 configs = [ 97 "../../common:iam_log_config", 98 "../../common:iam_utils_config", 99 "../../frameworks/native/ipc:userauth_client_ipc_config", 100 ] 101 102 subsystem_name = "useriam" 103 part_name = "user_auth_framework" 104} 105