digitalmars.D - How to stop DMD from linking against phobos
- Benjamin Thaut (4/4) Dec 08 2011 Is there a way to stop dmd from linking against phobos?
- Steven Schveighoffer (5/7) Dec 08 2011 Just don't use dmd to link. I think there is a way to replace phobos, b...
- David Nadlinger (6/10) Dec 08 2011 See the -defaultlib and -debuglib switches. druntime is hardcoded
- Jacob Carlborg (4/12) Dec 08 2011 druntime is statically linked with Phobos.
- Martin Nowak (6/10) Dec 08 2011 We should fix defaultlib and debuglib to accept empty values.
- mta`chrono (5/10) Dec 09 2011 # dmd code.d -v -defaultlib=""
- Martin Nowak (3/13) Dec 12 2011 Because you need the C runtime startup objects.
Is there a way to stop dmd from linking against phobos? (Most preferred would be some command line parameters to dmd) Kind Regards Benjamin Thaut
Dec 08 2011
On Thu, 08 Dec 2011 12:50:36 -0500, Benjamin Thaut <code benjamin-thaut.de> wrote:Is there a way to stop dmd from linking against phobos? (Most preferred would be some command line parameters to dmd)Just don't use dmd to link. I think there is a way to replace phobos, but not just make it disappear. -Steve
Dec 08 2011
On 12/8/11 6:50 PM, Benjamin Thaut wrote:Is there a way to stop dmd from linking against phobos? (Most preferred would be some command line parameters to dmd) Kind Regards Benjamin ThautSee the -defaultlib and -debuglib switches. druntime is hardcoded anyway, so you could e.g. use: dmd -defaultlib="druntime -debuglib="druntime" Hope this helps, David
Dec 08 2011
On 2011-12-08 19:11, David Nadlinger wrote:On 12/8/11 6:50 PM, Benjamin Thaut wrote:druntime is statically linked with Phobos. -- /Jacob CarlborgIs there a way to stop dmd from linking against phobos? (Most preferred would be some command line parameters to dmd) Kind Regards Benjamin ThautSee the -defaultlib and -debuglib switches. druntime is hardcoded anyway, so you could e.g. use:
Dec 08 2011
On Thu, 08 Dec 2011 18:50:36 +0100, Benjamin Thaut <code benjamin-thaut.de> wrote:Is there a way to stop dmd from linking against phobos? (Most preferred would be some command line parameters to dmd) Kind Regards Benjamin ThautWe should fix defaultlib and debuglib to accept empty values. Can you make a bug report for it. Currently you can call 'dmd ... -v' to see the linker (gcc) call, then you could repeat this step without -lphobos2.
Dec 08 2011
gcc code.o -o code -m64 -Xlinker -L/usr/lib32 -Xlinker -L/usr/lib64 -Xlinker --export-dynamic -lrt -l -lpthread -lm -lrt This line works for me. I can't tell you why dmd invokes gcc instead of ld. But you could also use -c switch and call the linker manually.Is there a way to stop dmd from linking against phobos? (Most preferred would be some command line parameters to dmd)We should fix defaultlib and debuglib to accept empty values. Can you make a bug report for it.
Dec 09 2011
On Fri, 09 Dec 2011 10:17:00 +0100, mta`chrono <chrono mta-international.net> wrote:Because you need the C runtime startup objects.gcc code.o -o code -m64 -Xlinker -L/usr/lib32 -Xlinker -L/usr/lib64 -Xlinker --export-dynamic -lrt -l -lpthread -lm -lrt This line works for me. I can't tell you why dmd invokes gcc instead of ld. But you could also use -c switch and call the linker manually.Is there a way to stop dmd from linking against phobos? (Most preferred would be some command line parameters to dmd)We should fix defaultlib and debuglib to accept empty values. Can you make a bug report for it.
Dec 12 2011