On 2012-05-31 11:11, jerro wrote:

I just remembered you can do something similar with DMD, too, using
-defaultlib. Make a static library containing just _Dmodule_ref:


echo "void* _Dmodule_ref;" | gcc -x c - -c -o dmodule_ref.o
ar cr libdmodule_ref.a dmodule_ref.o

Now put it somewhere where the linker can find it. Now you can compile d
programs without druntime like this:

dmd hello.d -defaultlib=dmodule_ref

Perhaps manually do the linking with gcc. DMD links using gcc anyway.

--
/Jacob Carlborg

Reply via email to