From 509146d9f767d904e7821c8b49bb2fa141e31da8 Mon Sep 17 00:00:00 2001 From: Yiyang Wu Date: Wed, 1 May 2024 17:38:33 +0800 Subject: [PATCH] Allow link to llvm shared library for current distros Signed-off-by: "Yiyang Wu " --- amd/device-libs/utils/prepare-builtins/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/amd/device-libs/utils/prepare-builtins/CMakeLists.txt b/amd/device-libs/utils/prepare-builtins/CMakeLists.txt index 63661962860acd..079dc08e3419f0 100644 --- a/amd/device-libs/utils/prepare-builtins/CMakeLists.txt +++ b/amd/device-libs/utils/prepare-builtins/CMakeLists.txt @@ -26,5 +26,9 @@ set_target_properties(prepare-builtins PROPERTIES CXX_STANDARD_REQUIRED Yes CXX_EXTENSIONS No) llvm_update_compile_flags(prepare-builtins) -llvm_map_components_to_libnames(llvm_libs support core bitreader bitwriter) +if (LLVM_LINK_LLVM_DYLIB) + set(llvm_libs LLVM) +else() + llvm_map_components_to_libnames(llvm_libs support core bitreader bitwriter) +endif() target_link_libraries(prepare-builtins ${llvm_libs})