[llvm] 0bd614a - [Cygwin] Don't use version script for Cygwin target (#143133)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 13 22:36:18 PDT 2025


Author: Tomohiro Kashiwada
Date: 2025-06-13T22:36:14-07:00
New Revision: 0bd614a8ee11cfc5cee8719b3209f40b163d5a62

URL: https://github.com/llvm/llvm-project/commit/0bd614a8ee11cfc5cee8719b3209f40b163d5a62
DIFF: https://github.com/llvm/llvm-project/commit/0bd614a8ee11cfc5cee8719b3209f40b163d5a62.diff

LOG: [Cygwin] Don't use version script for Cygwin target (#143133)

Cygwin is a COFF platform and does not support version-script.
I guess I should use LLVM_HAVE_LINK_VERSION_SCRIPT here, but I don't
know why this is not currently the case.

Added: 
    

Modified: 
    llvm/tools/llvm-shlib/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/llvm/tools/llvm-shlib/CMakeLists.txt b/llvm/tools/llvm-shlib/CMakeLists.txt
index 089255f361045..9a2015f61f2bf 100644
--- a/llvm/tools/llvm-shlib/CMakeLists.txt
+++ b/llvm/tools/llvm-shlib/CMakeLists.txt
@@ -66,7 +66,7 @@ if(LLVM_BUILD_LLVM_DYLIB)
     else()
       # GNU ld doesn't resolve symbols in the version script.
       set(LIB_NAMES -Wl,--whole-archive ${LIB_NAMES} -Wl,--no-whole-archive)
-      if (NOT LLVM_LINKER_IS_SOLARISLD AND NOT MINGW)
+      if (NOT LLVM_LINKER_IS_SOLARISLD AND NOT MINGW AND NOT CYGWIN)
         # Solaris ld does not accept global: *; so there is no way to version *all* global symbols
         set(LIB_NAMES -Wl,--version-script,${LLVM_LIBRARY_DIR}/tools/llvm-shlib/simple_version_script.map ${LIB_NAMES})
       endif()


        


More information about the llvm-commits mailing list