Poll: -od -lib -of and breaking compatibility with build tools
Ethan
gooberman at gmail.com
Mon Aug 12 10:29:40 UTC 2019
On Monday, 12 August 2019 at 05:59:53 UTC, FeepingCreature wrote:
> I ran into this bug a few days ago.
>
> 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).
>
> This issue was raised four years ago. At the time, Walter said
> he was not fixing it in order to avoid breaking compatibility
> with existing build setups: see
> https://github.com/dlang/dmd/pull/4753 .
>
> People who are using build tools that call dmd: would you
> rather this be fixed, and have to update your code, or leave it
> in?
>
> (Me, I want it fixed. It's a really annoying trap for all the
> people who are building with dmd but aren't using -od yet,
> which I was among until a few days ago.)
Quite honestly, *any* DMD upgrade tends to break my build setup.
Because things get changed and deprecated and added all the time,
so my builds fail from compile errors.
If you can't spare a minute to update your make files during a
DMD upgrade, then something has gone terribly wrong on your end.
Fix the bug.
More information about the Digitalmars-d
mailing list