Poll: -od -lib -of and breaking compatibility with build tools
FeepingCreature
feepingcreature at gmail.com
Mon Aug 12 05:59:53 UTC 2019
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.)
More information about the Digitalmars-d
mailing list