Poll: -od -lib -of and breaking compatibility with build tools

FeepingCreature feepingcreature at gmail.com
Mon Aug 12 12:19:56 UTC 2019


On Monday, 12 August 2019 at 11:16:12 UTC, Joseph Rushton 
Wakeling wrote:
> On Monday, 12 August 2019 at 05:59:53 UTC, FeepingCreature 
> wrote:
>> DMD, when specifying -od (output directory), -of (output file) 
>> and *only* when in -lib mode, treats the output file path as 
>> relative to the output directory path. Ie. -odfoo -oflibbar.a 
>> results in foo/libbar.a as opposed to ./libbar.a. This is in 
>> contradiction to every other mode (-shared, binary output, 
>> object output) and every other D compiler (ldc, gdc).
>
> Is there any reason, other than arbitrariness, why this is so?  
> e.g. are there some circumstances where using the `-lib` flag 
> might result in more than one output file being generated 
> (which presumably need to wind up in the same dir)?

As far as I can tell, it's just a bug that was decided not to 
fix. Even if -lib generates additional output files, they should 
just go in the -od folder; -of should always uniquely identify 
the generated library file.


More information about the Digitalmars-d mailing list