OPTLINK needs to die.

Walter Bright newshound1 at digitalmars.com
Mon Feb 16 22:12:06 PST 2009


Jarrett Billingsley wrote:
> On Mon, Feb 16, 2009 at 11:32 PM, Walter Bright
> <newshound1 at digitalmars.com> wrote:
>> Jarrett Billingsley wrote:
>>> http://d.puremagic.com/issues/show_bug.cgi?id=424
>>
>> I just added this to the bug report:
>>
>> ======================
>> The compiler already has a switch to generate multiple obj files from one
>> source file: -multiobj. I use it for debugging. But it would be a royal pain
>> to use if there's a lot.
> 
> Why isn't it documented?  And you're damn right it would be a pain.
> Especially when I'm compiling three external libraries and a large
> library of my own.

Because it's pretty useless.


>> Can you give it a try?
> Not easily.  Under my normal compilation scheme I'm not building a
> library and I have no idea how well bud/rebuild will cope with a
> zillion object files.

The point of building a library directly is that you never see the 
zillion object files. dmd generates the library directly.

> In any case the -lib switch is just sidestepping the problems with the
> linker and object format by pushing some of the linker's
> responsibilities into the compiler.  DMD (and the D language itself,
> if you want to count the 16MB limit on static data, which has no place
> in a portable language specification!) already makes far too many
> concessions to deal with the ridiculous constraints of the linker.
> Please, stop designing around the problem and fix it.

The -lib option has nothing to do with linker problems. It exists and is 
highly useful on linux and osx. It enables building libraries in one 
operation without having to dink around with managing the object files.



More information about the Digitalmars-d mailing list