[Patch][bug] Proposed fix for bug 12795

Moritz Maxeiner moritzmaxeiner at googlemail.com
Sun Feb 10 09:12:54 PST 2013


Fix bug 12795 
(http://llvm.org/bugs/show_bug.cgi?id=12795)<cid:part1.08000402.04090405 at gmail.com> 
by using .a.o instead of .def for the main shared lib (  
LLVM-$(LLVMVERSION).dll  )
when building for host os mingw and host architecture x86_64.

Index: Makefile.rules
===================================================================
--- Makefile.rules    (revision 170207)
+++ Makefile.rules    (working copy)
@@ -1128,8 +1128,19 @@
  # Windows
  ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
  # LLVMLibsOptions is invalidated at processing tools/llvm-shlib.
+
+# For x86_64 mingw don't use the native export file
+# but the static library itself for the main shared library
+ifeq ($(HOST_ARCH),x86_64)
+  ifeq ($(HOST_OS),MingW)
+    ifeq ($(LIBRARYNAME),LLVM-$(LLVMVersion))
+      SharedLinkOptions += $(ObjDir)/$(notdir 
$(EXPORTED_SYMBOL_FILE:.exports=.a.o))
+    endif
+  endif
+else
  SharedLinkOptions += $(NativeExportsFile)
  endif
+endif

  endif


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130210/36ca79ce/attachment.html>
-------------- next part --------------
Index: Makefile.rules
===================================================================
--- Makefile.rules	(revision 170207)
+++ Makefile.rules	(working copy)
@@ -1128,8 +1128,19 @@
 # Windows
 ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
 # LLVMLibsOptions is invalidated at processing tools/llvm-shlib.
+
+# For x86_64 mingw don't use the native export file
+# but the static library itself for the main shared library
+ifeq ($(HOST_ARCH),x86_64)
+  ifeq ($(HOST_OS),MingW)
+    ifeq ($(LIBRARYNAME),LLVM-$(LLVMVersion))
+      SharedLinkOptions += $(ObjDir)/$(notdir $(EXPORTED_SYMBOL_FILE:.exports=.a.o))
+    endif
+  endif
+else
 SharedLinkOptions += $(NativeExportsFile)
 endif
+endif
 
 endif
 



More information about the llvm-commits mailing list