On 2013-11-16 16:39, Andrew Edwards wrote:

You nailed it. It is in the dmd.conf file. Its content is this:

      [Environment]
      DFLAGS=-L--export-dynamic -I%@P%/../import -L-L%@P%/../lib -L-lrt

It is generated automatically from src/dmd.conf.default while building
dmd as such:

      make -f posix.mak install

I see. I have never used "install" for DMD before. dmd.conf shipping in the zip does not have -L--export-dynamic.

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.

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.

It's liking with the "rt" library. That is, librt.dylib or librt.a. This is neither used on Mac OS X. I'm guessing "make -f posix.mak install" will generate a dmd.conf file for Linux.

--
/Jacob Carlborg

Reply via email to