[llvm] [LLVM][Cygwin] Fix llvm-config shared library names (PR #136599)
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 23 01:12:59 PDT 2025
================
@@ -64,7 +64,11 @@ set(LLVM_CFLAGS "${LLVM_C_STD_FLAG} ${LLVM_DEFINITIONS}")
set(LLVM_CXXFLAGS "${CMAKE_CXX${CMAKE_CXX_STANDARD}_STANDARD_COMPILE_OPTION} ${LLVM_CXX_STDLIB_FLAG} ${COMPILE_FLAGS} ${LLVM_DEFINITIONS}")
set(LLVM_BUILD_SYSTEM cmake)
set(LLVM_HAS_RTTI ${LLVM_CONFIG_HAS_RTTI})
-set(LLVM_DYLIB_VERSION "${LLVM_VERSION_MAJOR}${LLVM_VERSION_SUFFIX}")
+if(CYGWIN)
+ set(LLVM_DYLIB_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}${LLVM_VERSION_SUFFIX}")
+else()
+ set(LLVM_DYLIB_VERSION "${LLVM_VERSION_MAJOR}${LLVM_VERSION_SUFFIX}")
+endif()
----------------
mstorsjo wrote:
> I don't like the idea of having libLLVM diverge from libclang/libclang-cpp though.
That does seem to be the case everywhere right now anyway, so that's more of an upstream LLVM-in-general thing?
I think that trying to mimic the mingw behaviour here probably is the most reasonable thing to do. (The broken symlinks is something that doesn't really show up in mingw cases I think?)
Tests for changes to this tool are in `llvm/test/tools/llvm-config`. But I'm not sure if anything of this really is covered there so far, as this is quite dependent on the type of build (whether dylibs are enabled etc). See `system-libs.windows.test` and `system-libs.test` for host OS specific tests there.
https://github.com/llvm/llvm-project/pull/136599
More information about the llvm-commits
mailing list