1# Copyright (c) 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. 13import("//foundation/resourceschedule/device_standby/standby_service.gni") 14 15config("standby_utils_common_config") { 16 include_dirs = [ "include" ] 17} 18 19ohos_shared_library("standby_utils_common") { 20 branch_protector_ret = "pac_ret" 21 sanitize = { 22 cfi = true 23 cfi_cross_dso = true 24 debug = false 25 } 26 cflags_cc = [ 27 "-fstack-protector-strong", 28 ] 29 sources = [ 30 "src/common_constant.cpp", 31 "src/standby_hitrace_chain.cpp", 32 "src/report_data_utils.cpp", 33 ] 34 35 public_configs = [ ":standby_utils_common_config" ] 36 37 external_deps = [ 38 "c_utils:utils", 39 "hilog:libhilog", 40 "hitrace:libhitracechain", 41 "ipc:ipc_single", 42 "json:nlohmann_json_static", 43 ] 44 45 defines = [] 46 if (enable_standby_configpolicy) { 47 external_deps += [ "config_policy:configpolicy_util" ] 48 defines += [ "STANDBY_CONFIG_POLICY_ENABLE" ] 49 } 50 51 subsystem_name = "resourceschedule" 52 part_name = "${standby_service_part_name}" 53} 54