[llvm] [Cygwin] Don't use version script for Cygwin target (PR #143133)
Tomohiro Kashiwada via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 6 06:02:58 PDT 2025
https://github.com/kikairoya created https://github.com/llvm/llvm-project/pull/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.
>From e6aade411a36f672294fe0332c5f17a9f4b4e806 Mon Sep 17 00:00:00 2001
From: kikairoya <kikairoya at gmail.com>
Date: Sun, 1 Jun 2025 09:54:19 +0900
Subject: [PATCH] [Cygwin] Don't use version script for Cygwin target
---
llvm/tools/llvm-shlib/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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