From 8a626fe3ab0491bd1d4cb688e419faaed3b6c341 Mon Sep 17 00:00:00 2001 From: Pirama Arumuga Nainar Date: Tue, 25 Jun 2019 19:34:52 +0000 Subject: [PATCH] [llvm-shlib] Do not use version script when building with MinGW Summary: The MinGW driver for lld does not support the --version-script option. For GNU ld, it's a no-op since LLVM.dll exports all symbols. Reviewers: srhines, mstorsjo Subscribers: mgorny, fedor.sergeev, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63743 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364343 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llvm-shlib/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/llvm-shlib/CMakeLists.txt b/tools/llvm-shlib/CMakeLists.txt index bc5ea44e336..5e491ca1f65 100644 --- a/tools/llvm-shlib/CMakeLists.txt +++ b/tools/llvm-shlib/CMakeLists.txt @@ -55,7 +55,7 @@ if(LLVM_BUILD_LLVM_DYLIB) # 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) + if (NOT LLVM_LINKER_IS_SOLARISLD AND NOT MINGW) # 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()