Fix dependency on socperf.

Signed-off-by: guozejun <guozejun@huawei.com>
Change-Id: I4f048b3271d52596a68fa8cad0f005ffdf2e216e
This commit is contained in:
guozejun 2023-07-05 19:57:43 +08:00
parent a26c83cf25
commit 900015fe5e
2 changed files with 5 additions and 0 deletions

View File

@ -89,6 +89,7 @@ template("ace_osal_ohos_source_set") {
if (defined(global_parts_info) &&
defined(global_parts_info.resourceschedule_soc_perf)) {
external_deps += [ "soc_perf:socperf_client" ]
defines += [ "SOC_PERF_ENABLE" ]
}
external_deps += [

View File

@ -15,7 +15,9 @@
#include "adapter/ohos/osal/socperf_client_impl.h"
#ifdef SOC_PERF_ENABLE
#include "socperf_client.h"
#endif
namespace OHOS::Ace {
SocPerfClient& SocPerfClient::GetInstance()
@ -26,6 +28,8 @@ SocPerfClient& SocPerfClient::GetInstance()
void SocPerfClientImpl::PerfRequest(int32_t cmdId, const std::string& msg)
{
#ifdef SOC_PERF_ENABLE
OHOS::SOCPERF::SocPerfClient::GetInstance().PerfRequest(cmdId, msg);
#endif
};
} // namespace OHOS::Ace