[Issue 7044] Missing a way to control the order of arguments passed to the linker makes impossible to link some programs

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Jun 2 17:36:05 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=7044

--- Comment #44 from Walter Bright <bugzilla at digitalmars.com> ---
> How is this then different from just specifying a whole new config file?

Because multiple sections can be selected, rather than having a separate config
file for each combination of sections, which would be a combinatorial
explosion.


> The user should be required to just use -debug when he wants to use the debug version of the library,

I agree, but I'd like to try this out first to see what the common usage
patterns will be, and then adding those later. If we add them now, we may wind
up with a bunch of useless clutter that we cannot remove because we don't want
to break legacy makefiles.


> getting rid from automatic linker flags inserted by compiler and make it fully controllable by packager (preferrably via dmd.conf) instead. This is actual issue that needs to be solved

Linker flags can already be specified with the -L switch. The trouble is the
order of them. I just do not have a good idea for that, and yet still have the
compiler conveniently generate them. It's also good to keep in mind that all
dmd does is generate a command line for gcc - that can always be done by the
user.

Pull 497 does add a switch to add linker switches in front, but I feel this is
simply doomed - what happens when a linker switch is needed in the middle?

--


More information about the Digitalmars-d-bugs mailing list