1# Copyright (C) 2021-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("//base/security/huks/huks.gni") 15import("//build/ohos.gni") 16 17config("libhuks_service_systemapi_mock_config") { 18 include_dirs = [ "//base/security/huks/services/huks_standard/huks_service/main/systemapi_wrap/useridm/inc" ] 19} 20 21ohos_static_library("libhuks_service_systemapi_mock_static") { 22 sanitize = { 23 integer_overflow = true 24 cfi = true 25 debug = false 26 cfi_cross_dso = true 27 boundary_sanitize = true 28 ubsan = true 29 } 30 branch_protector_ret = "pac_ret" 31 32 subsystem_name = "security" 33 part_name = "huks" 34 configs = [ 35 "//base/security/huks/frameworks/config/build:l2_standard_common_config", 36 ] 37 public_configs = [ ":libhuks_service_systemapi_mock_config" ] 38 39 sources = [ "src/hks_useridm_api_mock.cpp" ] 40 41 deps = [ "//base/security/huks/frameworks/huks_standard/main/common:libhuks_common_standard_static" ] 42 43 external_deps = [ 44 "hilog:libhilog", 45 "ipc:ipc_single", 46 ] 47 48 cflags_cc = [ 49 "-Wall", 50 "-Werror", 51 ] 52 cflags = cflags_cc 53 if (enable_user_auth_framework) { 54 cflags += [ "-DHKS_SUPPORT_USER_AUTH_ACCESS_CONTROL" ] 55 external_deps += [ "user_auth_framework:userauth_client" ] 56 } 57 complete_static_lib = true 58} 59