Leandro Lucarella <> changed:

           What    |Removed                     |Added
           Keywords|pull                        |

--- Comment #3 from Leandro Lucarella <> 
2012-10-21 11:05:35 PDT ---
See the (deprecated) pull request for more discussion on the topic.

Here I propose a solution that's simple, backwards compatible, and works the
same way DMD already does in terms of environment variables and switches.

We just need to extend -defaultlib and -debuglib to accept not only the name of
the standard library but any other linker flag needed. A simple heuristic
should be enough, like if the argument starts with "-" or "/" it should be
considered raw arguments to pass to the linker instead of just a library name.

This way you could use just -defaultlib=phobos2 or a more complex
-defaultlib="-lphobos2 -lrt -ldl". When using the (deprecated) old way, we can
still add the needed hardcoded linker flags until at some point it can be not
supported anymore and just pass it as raw linker arguments wihout any heuristic
to detect the old behaviour.

This way you can control which runtime to use either in the command line, in
the dmd.conf or in the DFLAGS enviroment variable, with the usual overriding
rules (you can specify a system default in the dmd.conf file, override it in
your user's setup or Makefile using the DFLAGS environment variable and even
override that using regular command line arguments when invoking dmd.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to