From 6fec39ae64237fca2a4f350f0880312a3d478838 Mon Sep 17 00:00:00 2001 From: Yiyang Wu Date: Tue, 30 Apr 2024 13:35:08 +0800 Subject: [PATCH] kfdtest: Allow linking libLLVM dynamic library rather than separate components Change-Id: Idc531ab35924f856600049f7f0101d1141ebcd51 Signed-off-by: Yiyang Wu Signed-off-by: Kent Russell Signed-off-by: Chris Freehill [ROCm/ROCR-Runtime commit: 4063c7a285ae583a55d9b6e12b799387c4a8afb2] --- .../rocr-runtime/libhsakmt/tests/kfdtest/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/projects/rocr-runtime/libhsakmt/tests/kfdtest/CMakeLists.txt b/projects/rocr-runtime/libhsakmt/tests/kfdtest/CMakeLists.txt index 9d1172e2f1..ccad7f460a 100644 --- a/projects/rocr-runtime/libhsakmt/tests/kfdtest/CMakeLists.txt +++ b/projects/rocr-runtime/libhsakmt/tests/kfdtest/CMakeLists.txt @@ -154,7 +154,11 @@ include_directories(${LLVM_INCLUDE_DIRS}) separate_arguments(LLVM_DEFINITIONS_LIST NATIVE_COMMAND ${LLVM_DEFINITIONS}) add_definitions(${LLVM_DEFINITIONS_LIST}) -llvm_map_components_to_libnames(llvm_libs AMDGPUAsmParser Core Support) +if (LLVM_LINK_LLVM_DYLIB) + set(llvm_libs LLVM) +else() + llvm_map_components_to_libnames(llvm_libs AMDGPUAsmParser Core Support) +endif() include_directories(${PROJECT_SOURCE_DIR}/gtest-1.6.0) include_directories(${PROJECT_SOURCE_DIR}/include)