diff --git a/lib/compiler/src/compile.erl b/lib/compiler/src/compile.erl index 1c66f80481cf..7ef44ef05200 100644 --- a/lib/compiler/src/compile.erl +++ b/lib/compiler/src/compile.erl @@ -1919,7 +1919,7 @@ metadata_add_features(Ftrs, #compile{extra_chunks = Extra} = St) -> proplists:from_map(maps:put(?META_USED_FEATURES, NewFtrs, proplists:to_map(MetaData))), Extra1 = proplists:from_map(maps:put(?META_CHUNK_NAME, - erlang:term_to_binary(MetaData1), + term_to_binary(MetaData1, [deterministic]), proplists:to_map(Extra))), St#compile{extra_chunks = Extra1}. @@ -2467,8 +2467,8 @@ debug_info_chunk(#compile{mod_options=ModOpts0, false -> {erl_abstract_code,{none,AbstOpts},ModOpts0} end, - DebugInfo = erlang:term_to_binary({debug_info_v1,Backend,Metadata}, - [compressed]), + DebugInfo = term_to_binary({debug_info_v1,Backend,Metadata}, + [deterministic, compressed]), {DebugInfo, ModOpts}. encrypt_debug_info(DebugInfo, Key, Opts) ->