1# Copyright (c) 2022-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. 13 14import("//build/config/components/idl_tool/idl.gni") 15import("//build/ohos.gni") 16import("../../../soc_perf.gni") 17 18idl_gen_interface("socperf_client_interface") { 19 src_idl = rebase_path("ISocPerf.idl") 20 log_domainid = "0xD001703" 21 log_tag = "SOCPERF" 22} 23 24config("socperf_client_public_config") { 25 include_dirs = [ 26 "include", 27 "${target_gen_dir}", 28 "${socperf_common}/include", 29 ] 30} 31 32ohos_shared_library("socperf_client") { 33 output_values = get_target_outputs(":socperf_client_interface") 34 sources = [ "src/socperf_client.cpp" ] 35 sources += filter_include(output_values, [ "*_proxy.cpp" ]) 36 37 public_configs = [ ":socperf_client_public_config" ] 38 deps = [ ":socperf_client_interface" ] 39 40 external_deps = [ 41 "c_utils:utils", 42 "hilog:libhilog", 43 "safwk:system_ability_fwk", 44 "samgr:samgr_proxy", 45 ] 46 47 public_external_deps = [ "ipc:ipc_single" ] 48 49 innerapi_tags = [ 50 "platformsdk", 51 "chipsetsdk", 52 ] 53 version_script = "libsocperf_client.versionscript" 54 part_name = "soc_perf" 55 subsystem_name = "resourceschedule" 56 branch_protector_ret = "pac_ret" 57 58 sanitize = { 59 cfi = true 60 cfi_cross_dso = true 61 debug = false 62 } 63 64 asmflags = [ "-Wl,-z,relro,-z,now" ] 65 66 cflags_cc = [ "-fstack-protector-strong" ] 67} 68 69ohos_source_set("socperf_stub") { 70 public_configs = [ ":socperf_client_public_config" ] 71 output_values = get_target_outputs(":socperf_client_interface") 72 sources = filter_include(output_values, [ "*_stub.cpp" ]) 73 deps = [ ":socperf_client_interface" ] 74 75 external_deps = [ 76 "c_utils:utils", 77 "hilog:libhilog", 78 "samgr:samgr_proxy", 79 ] 80 81 public_external_deps = [ "ipc:ipc_single" ] 82 subsystem_name = "resourceschedule" 83 part_name = "soc_perf" 84 branch_protector_ret = "pac_ret" 85 86 sanitize = { 87 cfi = true 88 cfi_cross_dso = true 89 debug = false 90 } 91} 92