[PATCH] D87521: [MinGW][llvm-config] Use unversioned library name

Mateusz MikuĊ‚a via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 12 01:48:21 PDT 2020


mati865 updated this revision to Diff 291379.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87521/new/

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 LlvmName =
+      HostTriple.isWindowsGNUEnvironment() ? "LLVM" : "LLVM-";
   const std::string DyLibName =
-      (SharedPrefix + "LLVM-" + SharedVersionedExt).str();
+      (SharedPrefix + LlvmName + 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.291379.patch
Type: text/x-patch
Size: 1147 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200912/1fc2c9eb/attachment.bin>


More information about the llvm-commits mailing list