Reproducible builds

Dalibor Topic dalibor.topic at oracle.com
Wed Mar 9 23:26:16 UTC 2022


Annotation processors may also be written in such a way to deliberately 
produce different outputs on each invocation, although one really, 
really should not do that.

cheers,
dalibor topic

On 09.03.2022 14:04, Joe Darcy wrote:
> 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

-- 
<http://www.oracle.com> Dalibor Topic
Consulting Product Manager
Phone: +494089091214 <tel:+494089091214>, Mobile: +491737185961
<tel:+491737185961>

Oracle Global Services Germany GmbH
Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRB 246209
Geschäftsführer: Ralf Herrmann



More information about the compiler-dev mailing list