digitalmars.D - How to stop DMD from linking against phobos
- Benjamin Thaut <code benjamin-thaut.de> Dec 08 2011
- "Steven Schveighoffer" <schveiguy yahoo.com> Dec 08 2011
- David Nadlinger <see klickverbot.at> Dec 08 2011
- Jacob Carlborg <doob me.com> Dec 08 2011
- "Martin Nowak" <dawg dawgfoto.de> Dec 08 2011
- mta`chrono <chrono mta-international.net> Dec 09 2011
- "Martin Nowak" <dawg dawgfoto.de> Dec 12 2011
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 Thaut
See 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: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
See the -defaultlib and -debuglib switches. druntime is hardcoded anyway, so you could e.g. use:
druntime is statically linked with Phobos. -- /Jacob Carlborg
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 Thaut
We 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
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.
# dmd code.d -v -defaultlib="" 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.
Dec 09 2011
On Fri, 09 Dec 2011 10:17:00 +0100, mta`chrono <chrono mta-international.net> wrote: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.
# dmd code.d -v -defaultlib="" 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.
Because you need the C runtime startup objects.
Dec 12 2011









"Steven Schveighoffer" <schveiguy yahoo.com> 