How to prevent DMD from changing the executable files at each compilation ?
boris2.9 at gmail.com
Sun Sep 29 23:14:10 UTC 2019
On Sunday, 29 September 2019 at 11:15:43 UTC, Ecstatic Coder
> Every time I compile the same code with DMD, I get a slightly
> different ".exe" file on Windows.
> So before I implement a tool for this, is there an easy way to
> prevent DMD from "timestamping" its generated binaries, so that
> they become more "git-friendly" ?
Using the mingw64 setup you have two options, from LLVM linker
/Brepro Use a hash of the executable as the PE
/timestamp:<value> Specify the PE header timestamp
The first emulates a Visual Studio linker undocumented option. If
you change to the VS config this should work too.
The second uses a classic C/Unix timestamp value (time()
Also, make sure to NOT USE optlink linker by using -m32mscoff
dmd test.d -m64 -L/Brepro // or -L/timestamp:0
More information about the Digitalmars-d