aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src/beam_asm.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2016-12-09 10:23:38 +0100
committerGitHub <[email protected]>2016-12-09 10:23:38 +0100
commitb29787dbcc53b4ab1b5bfedd1ad45708d0f99dc1 (patch)
treef2fbdc591e1741024a9b1d487860281719442659 /lib/compiler/src/beam_asm.erl
parent53aa4605b8c23ec1cb7d5a79625db00ebdd63423 (diff)
parent8b0aff6608c42bf3c04381697b9ab57ffbd93456 (diff)
downloadotp-b29787dbcc53b4ab1b5bfedd1ad45708d0f99dc1.tar.gz
otp-b29787dbcc53b4ab1b5bfedd1ad45708d0f99dc1.tar.bz2
otp-b29787dbcc53b4ab1b5bfedd1ad45708d0f99dc1.zip
Merge pull request #1273 from bjorng/bjorn/compiler/deterministic/ERL-310
Add option 'deterministic' for reproducible builds OTP-14087
Diffstat (limited to 'lib/compiler/src/beam_asm.erl')
-rw-r--r--lib/compiler/src/beam_asm.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/compiler/src/beam_asm.erl b/lib/compiler/src/beam_asm.erl
index f6ca7a0afb..9c8ed2277f 100644
--- a/lib/compiler/src/beam_asm.erl
+++ b/lib/compiler/src/beam_asm.erl
@@ -233,7 +233,12 @@ build_attributes(Opts, SourceFile, Attr, MD5) ->
false -> Misc0;
true -> []
end,
- Compile = [{options,Opts},{version,?COMPILER_VSN}|Misc],
+ Compile = case member(deterministic, Opts) of
+ false ->
+ [{options,Opts},{version,?COMPILER_VSN}|Misc];
+ true ->
+ [{version,?COMPILER_VSN}]
+ end,
{term_to_binary(set_vsn_attribute(Attr, MD5)),term_to_binary(Compile)}.
build_line_table(Dict) ->