[llvm-dev] RFC: Should the default LLVM build be deterministic?

Justin Bogner via llvm-dev llvm-dev at lists.llvm.org
Tue May 3 09:53:13 PDT 2016


Mehdi Amini via llvm-dev <llvm-dev at lists.llvm.org> writes:
> Chris Bieneman via llvm-dev <llvm-dev at lists.llvm.org> writes:
>> It is my belief that the default LLVM configuration (meaning no
>> options specified) should be deterministic, and that any option in our
>> build/configuration system that can impact determinism should be
>> disabled by default.
>
> I don't think that "deterministic" is the right term (i.e. "current
> time" is an input of the build).
> Last month I spent a few hours debugging this (was trying to assert
> some "NFC" changes), so I definitely agree with you that the "current
> time" being part of the input of the build by default is not great,
> and I support disabling this.

This is especially silly because we don't even use the timestamp for
anything particularly valuable - cl::opt just likes to include it in its
version output.

For this case I'd suggest we just remove the ENABLE_TIMESTAMPS option
entirely and stop using __DATE__ in CommandLine.cpp. If someone *really*
wants a timestamp in the version output of the llvm tools for some
reason they can inject one into LLVM_VERSION_INFO.

(and yes, I agree in general that it'd be nice if building the same
source twice gave the same results by default, so +1 to that)


More information about the llvm-dev mailing list