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