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 16config("faceauth_framework_public_config") { 17 include_dirs = [ "inc" ] 18} 19 20ohos_shared_library("faceauth_framework") { 21 sanitize = { 22 integer_overflow = true 23 ubsan = true 24 boundary_sanitize = true 25 cfi = true 26 cfi_cross_dso = true 27 debug = false 28 blocklist = "../../cfi_blocklist.txt" 29 } 30 branch_protector_ret = "pac_ret" 31 sources = [ 32 "src/face_auth_client_impl.cpp", 33 "src/face_auth_proxy.cpp", 34 ] 35 36 public_configs = [ ":faceauth_framework_public_config" ] 37 38 configs = [ "../../common:iam_log_config" ] 39 40 include_dirs = [ 41 "../../common/utils", 42 "../../common/inc", 43 ] 44 45 external_deps = [ 46 "access_token:libaccesstoken_sdk", 47 "access_token:libtokenid_sdk", 48 "access_token:libtokensetproc_shared", 49 "c_utils:utils", 50 "hilog:libhilog", 51 "ipc:ipc_single", 52 "samgr:samgr_proxy", 53 ] 54 55 if (use_musl) { 56 version_script = "face_auth_framework_map" 57 } 58 59 if (defined(global_parts_info.graphic_graphic_2d)) { 60 external_deps += [ "graphic_surface:surface" ] 61 } 62 63 subsystem_name = "useriam" 64 innerapi_tags = [ "platformsdk" ] 65 part_name = "face_auth" 66} 67 68ohos_source_set("faceauth_framework_stub") { 69 sanitize = { 70 integer_overflow = true 71 ubsan = true 72 boundary_sanitize = true 73 cfi = true 74 cfi_cross_dso = true 75 debug = false 76 blocklist = "../../cfi_blocklist.txt" 77 } 78 branch_protector_ret = "pac_ret" 79 sources = [ "src/face_auth_stub.cpp" ] 80 81 configs = [ "../../common:iam_log_config" ] 82 83 public_configs = [ ":faceauth_framework_public_config" ] 84 85 include_dirs = [ 86 "../../common/utils", 87 "../../common/inc", 88 ] 89 90 external_deps = [ 91 "c_utils:utils", 92 "hilog:libhilog", 93 "ipc:ipc_single", 94 ] 95 96 if (defined(global_parts_info.graphic_graphic_2d)) { 97 external_deps += [ "graphic_surface:surface" ] 98 } 99 100 subsystem_name = "useriam" 101 part_name = "face_auth" 102} 103