diff runtime/lib/llvmdc-posix.mak @ 579:20c065c46b38

Basic support for runtime in shared library. Needs to be built with runtime/build-sharedlibs.sh and activated manually by providing -defaultlib=llvmdc-runtime-shared -defaultlib=tango-cc-tango-shared -defaultlib=tango-gc-basic-shared on llvmdc call at the moment. To support D shared libraries in non-D code, we need to remove the main() from libllvmdc-runtime-shared.
author Christian Kamm <kamm incasoftware de>
date Fri, 05 Sep 2008 23:02:18 +0200
parents 926a03711ca8
children 6aaa3d3c1183
line wrap: on
line diff
--- a/runtime/lib/llvmdc-posix.mak	Thu Sep 04 20:58:25 2008 +0200
+++ b/runtime/lib/llvmdc-posix.mak	Fri Sep 05 23:02:18 2008 +0200
@@ -37,8 +37,8 @@
 #ADD_DFLAGS=
 ADD_DFLAGS=-I`pwd`/common/
 
-targets : lib doc
-all     : lib doc
+targets : lib sharedlib doc
+all     : lib sharedlib doc
 
 ######################################################
 
@@ -56,6 +56,12 @@
 	make -C $(DIR_GC) -fllvmdc.mak lib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)"
 	# could link the three parts into one here, but why should we
 
+sharedlib : $(ALL_OBJS)
+	make -C $(DIR_CC) -fllvmdc.mak sharedlib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)"
+	make -C $(DIR_RT) -fllvmdc.mak sharedlib
+	make -C $(DIR_GC) -fllvmdc.mak sharedlib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)"
+	# could link the three parts into one here, but why should we
+
 doc : $(ALL_DOCS)
 	make -C $(DIR_CC) -fllvmdc.mak doc
 	make -C $(DIR_RT) -fllvmdc.mak doc