From 4a50f3b88f9dfb3803af03e8424349f94b335f94 Mon Sep 17 00:00:00 2001 From: Laurent Morichetti Date: Fri, 22 Apr 2022 19:00:39 -0700 Subject: [PATCH] Fix the static library build Building with -DLIBRARY_TYPE=STATIC fails with 3 undefined symbols. Add weak symbols to satisfy the linker (mirror what is done for the other Loader symbols). Change-Id: I8a2878def21d5f500b0764ceacb4e5255e1111c5 [ROCm/roctracer commit: b352eedac6dde4524e1057608a1835615a7209a0] --- projects/roctracer/src/core/loader.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/roctracer/src/core/loader.h b/projects/roctracer/src/core/loader.h index 7d849f6748..17b0d1ae58 100644 --- a/projects/roctracer/src/core/loader.h +++ b/projects/roctracer/src/core/loader.h @@ -151,6 +151,11 @@ __attribute__((weak)) const char* hipKernelNameRefByPtr(const void* hostFunction __attribute__((weak)) int hipGetStreamDeviceId(hipStream_t stream) { return 0; } __attribute__((weak)) const char* hipApiName(uint32_t id) { return NULL; } +__attribute__((weak)) void hipInitActivityCallback(void* id_callback, void* op_callback, + void* arg) {} +__attribute__((weak)) bool hipEnableActivityCallback(unsigned op, bool enable) { return false; } +__attribute__((weak)) const char* hipGetCmdName(unsigned op) { return NULL; } + class HipLoaderStatic { public: typedef std::mutex mutex_t;