changeset 3247:2419325342a5

Update mingw native llvm for dynamic lib * src/llvm.mk (native mingw): use MXE settable ENABLE_SHARED_OR_STATIC option in configure and remove --without-python option. Create and install an import library.
author John Donoghue <john.donoghue@ieee.org>
date Fri, 23 Aug 2013 06:38:50 -0400
parents 0e705514af1b
children e8240c0feedd
files src/llvm.mk
diffstat 1 files changed, 14 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/llvm.mk	Tue Sep 03 21:01:27 2013 -0400
+++ b/src/llvm.mk	Fri Aug 23 06:38:50 2013 -0400
@@ -48,11 +48,23 @@
       $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \
       --enable-targets='host-only' \
       --disable-docs \
-      --without-python \
-      --disable-shared --enable-static \
+      $(ENABLE_SHARED_OR_STATIC) \
       --prefix='$(HOST_PREFIX)'
 
     PATH='$(HOST_BINDIR):$(PATH)' $(MAKE) -C '$(1)/build' -j $(JOBS) install
+
+    # create import lib for the dll
+    $(if $(filter yes, $(BUILD_SHARED)),
+      cd '$(1)/build/tools/llvm-shlib/Release+Asserts' && \
+        $(MXE_DLLTOOL) \
+         --dllname "LLVM-`$(HOST_BINDIR)/llvm-config --version`.dll" \
+         --def "LLVM-`$(HOST_BINDIR)/llvm-config --version`.def" \
+         --output-lib "libLLVM-`$(HOST_BINDIR)/llvm-config --version`.a"
+      cd '$(1)/build/tools/llvm-shlib/Release+Asserts' && \
+        $(INSTALL) -m644 \
+         "libLLVM-`$(HOST_BINDIR)/llvm-config --version`.a" \
+         "$(HOST_LIBDIR)"
+    )
 endef
 endif
 else