Reproducible builds
Joe Darcy
joe.darcy at oracle.com
Wed Mar 9 13:04:27 UTC 2022
On a related note, it is allowable for the javac from JDK $N and the
javac from JDK $N+$K using --release $N to produce different class files.
-Joe
On 3/8/2022 5:16 PM, Jonathan Gibbons wrote:
> Yes, not only it is true for javac, but it is an aspiration for builds
> of OpenJDK as a whole.
>
> In general, the common problem is timestamps, and for those tools that
> use timestamps, there is a precedent to support a `--date` option.
> This includes jar, javadoc, jlink etc, but not javac, because javac
> does not put timestamps in generated files.
>
> -- Jon
>
>
> On 3/8/22 2:09 PM, Richard Bair wrote:
>> Hi!
>>
>> I am wondering whether it is a stated goal or non-legally binding
>> guarantee that the compilation of a program from the same build of
>> OpenJDK will always produce the same binary output? I understand that
>> at the specification level there is no guarantee of reproducible
>> builds, and that different JDKs from different providers may very
>> well produce non-identical binaries. Is there any indeterminism in a
>> run from javac that would produce different binary artifacts?
>>
>> Thanks
>> Richard
More information about the compiler-dev
mailing list