Building druntime on MAC OS X

Martin Nowak code at dawg.eu
Sat Nov 16 09:59:04 PST 2013


On 11/16/2013 04:39 PM, Andrew Edwards wrote:
> It is generated automatically from src/dmd.conf.default while building
> dmd as such:
>
>       make -f posix.mak install
>
The install target is work in progress. We want to use this to build 
releases, but it's not ready yet.

> Here is the explanation from man ld of the Mac OS X equivalent:
>
>     -export_dynamic
>             Preserves all global symbols in main executables during LTO.
>             Without this option, Link Time Optimization is allowed to
>             inline and remove global functions. This option is used when
>             a main executable may load a plug-in which requires certain
>             symbols from the main executable.
This is currently used for backtrace support.
>
> Not sure what -lrt is thought. It is not defined in the man pages, does
> not affect building of the libraries (druntime or phobos) but bombs out
> while building the tools.

The -lrt links in the Realtime Extensions library (librt) which is 
needed for some functions used by druntime (sched_*, sem_*).


More information about the Digitalmars-d mailing list