1# Copyright (C) 2022 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("../../screenlock.gni") 16 17config("screenlock_mgr_frameworks_native_config") { 18 visibility = [ ":*" ] 19 include_dirs = [ 20 "include", 21 "${screenlock_mgr_path}/frameworks/native/include", 22 "${screenlock_mgr_path}/services/include", 23 ] 24 25 cflags_cc = [] 26} 27 28ohos_shared_library("screenlock_client") { 29 if (is_standard_system) { 30 sanitize = { 31 cfi = true 32 cfi_cross_dso = true 33 debug = false 34 integer_overflow = true 35 boundary_sanitize = true 36 ubsan = true 37 } 38 branch_protector_ret = "pac_ret" 39 sources = [ 40 "${screenlock_mgr_path}/frameworks/native/src/screenlock_callback_stub.cpp", 41 "${screenlock_mgr_path}/frameworks/native/src/screenlock_inner_listener_stub.cpp", 42 "${screenlock_mgr_path}/frameworks/native/src/screenlock_inner_listener_wapper.cpp", 43 "${screenlock_mgr_path}/frameworks/native/src/screenlock_manager.cpp", 44 "${screenlock_mgr_path}/frameworks/native/src/screenlock_manager_proxy.cpp", 45 "${screenlock_mgr_path}/frameworks/native/src/screenlock_system_ability_stub.cpp", 46 ] 47 48 cflags = [ 49 "-fdata-sections", 50 "-ffunction-sections", 51 "-fvisibility=hidden", 52 "-Os", 53 ] 54 55 version_script = "screenlock_client.versionscript" 56 57 public_configs = [ ":screenlock_mgr_frameworks_native_config" ] 58 59 include_dirs = [ 60 "include", 61 "${screenlock_mgr_path}/frameworks/native/include", 62 ] 63 64 external_deps = [ 65 "c_utils:utils", 66 "eventhandler:libeventhandler", 67 "hilog:libhilog", 68 "hitrace:hitrace_meter", 69 "ipc:ipc_single", 70 "samgr:samgr_proxy", 71 ] 72 subsystem_name = "theme" 73 innerapi_tags = [ 74 "platformsdk", 75 "sasdk", 76 ] 77 part_name = "screenlock_mgr" 78 } 79} 80ohos_static_library("screenlock_client_static") { 81 if (is_standard_system) { 82 sanitize = { 83 cfi = true 84 cfi_cross_dso = true 85 debug = false 86 integer_overflow = true 87 boundary_sanitize = true 88 ubsan = true 89 } 90 branch_protector_ret = "pac_ret" 91 sources = [ 92 "${screenlock_mgr_path}/frameworks/native/src/screenlock_callback_stub.cpp", 93 "${screenlock_mgr_path}/frameworks/native/src/screenlock_inner_listener_stub.cpp", 94 "${screenlock_mgr_path}/frameworks/native/src/screenlock_inner_listener_wapper.cpp", 95 "${screenlock_mgr_path}/frameworks/native/src/screenlock_manager.cpp", 96 "${screenlock_mgr_path}/frameworks/native/src/screenlock_manager_proxy.cpp", 97 "${screenlock_mgr_path}/frameworks/native/src/screenlock_system_ability_stub.cpp", 98 ] 99 100 public_configs = [ ":screenlock_mgr_frameworks_native_config" ] 101 102 include_dirs = [ 103 "include", 104 "${screenlock_mgr_path}/frameworks/native/include", 105 ] 106 107 external_deps = [ 108 "c_utils:utils", 109 "eventhandler:libeventhandler", 110 "hilog:libhilog", 111 "hitrace:hitrace_meter", 112 "ipc:ipc_single", 113 "samgr:samgr_proxy", 114 ] 115 subsystem_name = "theme" 116 part_name = "screenlock_mgr" 117 } 118} 119