# Copyright (c) 2022-2024 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("../soc_perf.gni") config("socperf_server_config") { include_dirs = [ "core/include", "server/include", "${socperf_common}/include", "${socperf_interfaces}/inner_api/socperf_client/include", ] } ohos_shared_library("socperf_server") { configs = [ ":socperf_server_config" ] sources = [ "core/src/socperf.cpp", "core/src/socperf_config.cpp", "core/src/socperf_thread_wrap.cpp", "server/src/socperf_server.cpp", "server/src/socperf_stub.cpp", ] external_deps = [ "access_token:libaccesstoken_sdk", "access_token:libtokenid_sdk", "c_utils:utils", "config_policy:configpolicy_util", "eventhandler:libeventhandler", "ffrt:libffrt", "hilog:libhilog", "hisysevent:libhisysevent", "hitrace:hitrace_meter", "init:libbegetutil", "ipc:ipc_single", "json:nlohmann_json_static", "libxml2:libxml2", "resource_schedule_service:resschedexe_client", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] defines = [ "SOCPERF_ADAPTOR_FFRT" ] if (defined(global_parts_info) && defined(global_parts_info.resourceschedule_resource_schedule_service)) { external_deps += [ "resource_schedule_service:ressched_client" ] defines += [ "RES_SCHED_SA_INIT" ] } shlib_type = "sa" part_name = "soc_perf" subsystem_name = "resourceschedule" branch_protector_ret = "pac_ret" sanitize = { cfi = true cfi_cross_dso = true debug = false } } ohos_static_library("socperf_server_static") { configs = [ ":socperf_server_config" ] sources = [ "core/src/socperf.cpp", "core/src/socperf_config.cpp", "core/src/socperf_thread_wrap.cpp", "server/src/socperf_server.cpp", "server/src/socperf_stub.cpp", ] external_deps = [ "access_token:libaccesstoken_sdk", "access_token:libtokenid_sdk", "c_utils:utils", "config_policy:configpolicy_util", "eventhandler:libeventhandler", "ffrt:libffrt", "hilog:libhilog", "hisysevent:libhisysevent", "hitrace:hitrace_meter", "init:libbegetutil", "ipc:ipc_single", "json:nlohmann_json_static", "libxml2:libxml2", "resource_schedule_service:resschedexe_client", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] defines = [] part_name = "soc_perf" subsystem_name = "resourceschedule" branch_protector_ret = "pac_ret" sanitize = { cfi = true cfi_cross_dso = true debug = false } }