[erlang-questions] repeatable builds

Richard Carlsson carlsson.richard@REDACTED
Mon Apr 4 22:37:54 CEST 2016


Note that even if you strip the date, and any other things depending on the
environment where you compiled the code, like file paths on the local
machine, the resulting file will still depend on the version of the
compiler. Changes in optimizations made (and of course any new beam
operations) between releases of OTP will make the generated beam code
different, even if it's just for some functions here and there. If you're
aiming for some more universal property of the code, a hash of the parse
tree (after preprocessor expansions, n.b.) would be more suitable - but
then of course, it's hard to prove that the beam code corresponds to that
parse tree.


        /Richard

2016-04-04 21:59 GMT+02:00 Joe Armstrong <erlang@REDACTED>:

> Hello,
>
> I think I've asked this before but cannot find the answer:
>
> I want the beam file produced by
>
>   $ erl file.erl
>
> to always have the same sha1 checksum - there was, if I remember
> correctly, a hidden flag that removed the time of compilation etc from
> the beam code. Any ideas how to do this?
>
> /Joe
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160404/8264522e/attachment.htm>


More information about the erlang-questions mailing list