Skip to content

[llvm-config] Make llvm-config --system-libs obey LLVM_USE_STATIC_ZSTD. #93754

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions llvm/lib/Support/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,12 @@ if(LLVM_ENABLE_ZSTD)
if(NOT zstd_library)
get_property(zstd_library TARGET ${zstd_target} PROPERTY LOCATION)
endif()
get_library_name(${zstd_library} zstd_library)
set(llvm_system_libs ${llvm_system_libs} "${zstd_library}")
if (zstd_target STREQUAL zstd::libzstd_shared)
get_library_name(${zstd_library} zstd_library)
set(llvm_system_libs ${llvm_system_libs} "${zstd_library}")
else()
set(llvm_system_libs ${llvm_system_libs} "${zstd_STATIC_LIBRARY}")
endif()
endif()

set_property(TARGET LLVMSupport PROPERTY LLVM_SYSTEM_LIBS "${llvm_system_libs}")
Expand Down
Loading