1# Copyright (c) 2022-2024 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("../soc_perf.gni") 16 17config("socperf_server_config") { 18 include_dirs = [ 19 "core/include", 20 "dfx/include", 21 "server/include", 22 "${socperf_common}/include", 23 "${socperf_interfaces}/inner_api/socperf_client/include", 24 ] 25} 26 27ohos_shared_library("socperf_server") { 28 configs = [ ":socperf_server_config" ] 29 30 sources = [ 31 "core/src/socperf.cpp", 32 "core/src/socperf_config.cpp", 33 "core/src/socperf_thread_wrap.cpp", 34 "dfx/src/socperf_hitrace_chain.cpp", 35 "server/src/socperf_server.cpp", 36 ] 37 38 deps = [ "${socperf_interfaces}/inner_api/socperf_client:socperf_stub" ] 39 40 external_deps = [ 41 "access_token:libaccesstoken_sdk", 42 "access_token:libtokenid_sdk", 43 "c_utils:utils", 44 "config_policy:configpolicy_util", 45 "ffrt:libffrt", 46 "hilog:libhilog", 47 "hitrace:hitrace_meter", 48 "hitrace:libhitracechain", 49 "init:libbegetutil", 50 "ipc:ipc_single", 51 "json:nlohmann_json_static", 52 "resource_schedule_service:resschedexe_client", 53 "safwk:system_ability_fwk", 54 "samgr:samgr_proxy", 55 ] 56 57 public_external_deps = [ 58 "hisysevent:libhisysevent", 59 "libxml2:libxml2", 60 ] 61 62 defines = [] 63 64 if (defined(global_parts_info) && 65 defined(global_parts_info.resourceschedule_resource_schedule_service)) { 66 external_deps += [ "resource_schedule_service:ressched_client" ] 67 defines += [ "RES_SCHED_SA_INIT" ] 68 } 69 70 shlib_type = "sa" 71 part_name = "soc_perf" 72 subsystem_name = "resourceschedule" 73 branch_protector_ret = "pac_ret" 74 75 sanitize = { 76 cfi = true 77 cfi_cross_dso = true 78 debug = false 79 } 80 81 asmflags = [ "-Wl,-z,relro,-z,now" ] 82 83 cflags_cc = [ "-fstack-protector-strong" ] 84} 85 86ohos_static_library("socperf_server_static") { 87 configs = [ ":socperf_server_config" ] 88 89 sources = [ 90 "core/src/socperf.cpp", 91 "core/src/socperf_config.cpp", 92 "core/src/socperf_thread_wrap.cpp", 93 "dfx/src/socperf_hitrace_chain.cpp", 94 "server/src/socperf_server.cpp", 95 ] 96 97 deps = [ "${socperf_interfaces}/inner_api/socperf_client:socperf_stub" ] 98 99 external_deps = [ 100 "access_token:libaccesstoken_sdk", 101 "access_token:libtokenid_sdk", 102 "c_utils:utils", 103 "config_policy:configpolicy_util", 104 "ffrt:libffrt", 105 "hilog:libhilog", 106 "hitrace:hitrace_meter", 107 "hitrace:libhitracechain", 108 "init:libbegetutil", 109 "ipc:ipc_single", 110 "json:nlohmann_json_static", 111 "resource_schedule_service:resschedexe_client", 112 "safwk:system_ability_fwk", 113 "samgr:samgr_proxy", 114 ] 115 116 public_external_deps = [ 117 "hisysevent:libhisysevent", 118 "libxml2:libxml2", 119 ] 120 121 defines = [] 122 123 part_name = "soc_perf" 124 subsystem_name = "resourceschedule" 125 branch_protector_ret = "pac_ret" 126 127 sanitize = { 128 cfi = true 129 cfi_cross_dso = true 130 debug = false 131 } 132} 133