[LLD] [ELF] Fix building with LLVM_LINK_LLVM_DYLIB since zstd was taken into use
This fixes a regression since fa74144c64dff6b145b0b3fa9397f913ddaa87bf; even if we're linking to the dylib (which handles all the dependencies in LLVMSupport), we're now also directly referencing zstd from lld/ELF, and thus need to explicitly express our dependency on it.
This commit is contained in:
parent
dad36245a5
commit
525a400c7c
|
@ -6,6 +6,18 @@ if(LLVM_ENABLE_ZLIB)
|
|||
set(imported_libs ZLIB::ZLIB)
|
||||
endif()
|
||||
|
||||
if(LLVM_ENABLE_ZSTD)
|
||||
if(TARGET zstd::libzstd_shared AND NOT LLVM_USE_STATIC_ZSTD)
|
||||
set(zstd_target zstd::libzstd_shared)
|
||||
else()
|
||||
set(zstd_target zstd::libzstd_static)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(LLVM_ENABLE_ZSTD)
|
||||
list(APPEND imported_libs ${zstd_target})
|
||||
endif()
|
||||
|
||||
add_lld_library(lldELF
|
||||
AArch64ErrataFix.cpp
|
||||
Arch/AArch64.cpp
|
||||
|
|
Loading…
Reference in New Issue