Skip to content

Commit cc8a7b7

Browse files
amielczaigcbot
authored andcommitted
Add ZSTD dependency to lldELF
Add ZSTD dependency to lldELF
1 parent befdece commit cc8a7b7

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

IGC/cmake/igc_find_liblldELF.cmake

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,17 @@ elseif(IGC_BUILD__LLVM_PREBUILDS)
136136
target_link_libraries(lldELF INTERFACE ZLIB::ZLIB)
137137
endif()
138138

139+
if(LLVM_ENABLE_ZSTD)
140+
find_package(zstd)
141+
if(zstd_LIBRARY MATCHES "${zstd_SHARED_LIBRARY_SUFFIX}$")
142+
target_link_libraries(lldELF INTERFACE zstd::libzstd_shared)
143+
elseif(zstd_STATIC_LIBRARY MATCHES "${zstd_STATIC_LIBRARY_SUFFIX}$")
144+
target_link_libraries(lldELF INTERFACE zstd::libzstd_static)
145+
else()
146+
message(FATAL_ERROR "Cannot find zstd library. Please install the missing library.")
147+
endif()
148+
endif()
149+
139150
if(NOT DEFINED IGC_OPTION__LLDELF_H_DIR)
140151
set(IGC_OPTION__LLDELF_H_DIR ${LLVM_ROOT})
141152
endif()

0 commit comments

Comments
 (0)