Skip to content

Commit b4216d7

Browse files
committed
Refer to the correct library type in llvm-config error
1 parent 6ae157f commit b4216d7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cmake/Findllvm.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ if(ZIG_USE_LLVM_CONFIG)
6060

6161
if (LLVM_CONFIG_ERROR)
6262
# Save the error message, in case this is the last llvm-config we find
63-
set(LLVM_CONFIG_ERROR_MESSAGE "LLVM 14.x found at ${LLVM_CONFIG_EXE} does not support linking as shared library (\"${LLVM_CONFIG_ERROR}\")")
63+
if (ZIG_SHARED_LLVM)
64+
set(LLVM_CONFIG_ERROR_MESSAGE "LLVM 14.x found at ${LLVM_CONFIG_EXE} does not support linking as shared library (\"${LLVM_CONFIG_ERROR}\")")
65+
else()
66+
set(LLVM_CONFIG_ERROR_MESSAGE "LLVM 14.x found at ${LLVM_CONFIG_EXE} does not support linking as static library (\"${LLVM_CONFIG_ERROR}\")")
67+
endif()
6468

6569
# Ignore this directory and try the search again
6670
list(APPEND CMAKE_IGNORE_PATH "${LLVM_CONFIG_DIR}")

0 commit comments

Comments
 (0)