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

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Mon Aug 12 11:16:12 UTC 2019


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)?


More information about the Digitalmars-d mailing list