summaryrefslogtreecommitdiff
blob: 7a08dc4a1d0d5bed8ae260b4364e31b4df4c10f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
https://github.com/ROCm/llvm-project/pull/68
From 1c7e7f872980a5b15fb3d85f8780e78ce3b715b1 Mon Sep 17 00:00:00 2001
From: Selene <lixueying@mail.bnu.edu.cn>
Date: Wed, 1 May 2024 17:38:33 +0800
Subject: [PATCH] Allow link to llvm shared library for current distros

---
 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 63661962860a..079dc08e3419 100644
--- a/utils/prepare-builtins/CMakeLists.txt
+++ b/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})
-- 
2.44.0