[PATCH] D87521: [MinGW][llvm-config] Use unversioned library name
Mateusz MikuĊa via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 11 09:16:28 PDT 2020
mati865 created this revision.
mati865 added a reviewer: LLVM.
mati865 added a project: LLVM.
Herald added a subscriber: llvm-commits.
mati865 requested review of this revision.
When building LLVM for MinGW bare `LLVM.dll` or `libLLVM.dll` with https://reviews.llvm.org/D87517 is created
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D87521
Files:
llvm/tools/llvm-config/llvm-config.cpp
Index: llvm/tools/llvm-config/llvm-config.cpp
===================================================================
--- llvm/tools/llvm-config/llvm-config.cpp
+++ llvm/tools/llvm-config/llvm-config.cpp
@@ -379,7 +379,10 @@
const Triple HostTriple(Triple::normalize(LLVM_HOST_TRIPLE));
if (HostTriple.isOSWindows()) {
SharedExt = "dll";
- SharedVersionedExt = LLVM_DYLIB_VERSION ".dll";
+ if (HostTriple.isWindowsGNUEnvironment)
+ SharedVersionedExt = ".dll";
+ else
+ SharedVersionedExt = LLVM_DYLIB_VERSION ".dll";
if (HostTriple.isOSCygMing()) {
StaticExt = "a";
StaticPrefix = "lib";
@@ -417,8 +420,10 @@
const bool BuiltSharedLibs = !!LLVM_ENABLE_SHARED;
bool DyLibExists = false;
+ const std::string llvm_name =
+ HostTriple.isWindowsGNUEnvironment ? "LLVM" : "LLVM-";
const std::string DyLibName =
- (SharedPrefix + "LLVM-" + SharedVersionedExt).str();
+ (SharedPrefix + llvm_name + SharedVersionedExt).str();
// If LLVM_LINK_DYLIB is ON, the single shared library will be returned
// for "--libs", etc, if they exist. This behaviour can be overridden with
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87521.291243.patch
Type: text/x-patch
Size: 1145 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200911/27633b2f/attachment.bin>
More information about the llvm-commits
mailing list