From 12ce303085dc29d4401b167e6d57d5144c934f8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Wed, 2 Dec 2009 19:55:02 +0100 Subject: compiler: Teach 'slim' to omit compilation info The original intention for the undocumented 'slim' option was to omit non-essential parts of *.beam files to reduce the size of the primary bootstrap. Therefore, debug information and local function information (only used by xref, not by the loader) are omitted, but information about the compilation time and compiler version are still included. Including compilation information is troublesome, however, when committing the bootstrap into a revision control system, because every beam file is guaranteed to be changed every time the bootstrap is updated. Therefore, change the 'slim' option to also omit compilation information. --- lib/compiler/src/beam_asm.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/compiler/src/beam_asm.erl b/lib/compiler/src/beam_asm.erl index 90d25d87b2..497c4fa07b 100644 --- a/lib/compiler/src/beam_asm.erl +++ b/lib/compiler/src/beam_asm.erl @@ -150,7 +150,7 @@ build_file(Code, Attr, Dict, NumLabels, NumFuncs, Abst, SourceFile, Opts) -> %% Create IFF chunk. Chunks = case member(slim, Opts) of - true -> [Essentials,AttrChunk,CompileChunk,AbstChunk]; + true -> [Essentials,AttrChunk,AbstChunk]; false -> [Essentials,LocChunk,AttrChunk,CompileChunk,AbstChunk] end, build_form(<<"BEAM">>, Chunks). -- cgit v1.2.3 From 47bd30c0efd50af2f297c8f016ca80b08855592f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Wed, 2 Dec 2009 21:00:22 +0100 Subject: beam_makepos: Do not put any dates in generated files We don't want to have dates in files that are checked-in as part of the bootstrap compiler (such as beam_opcodes.{erl,hrl}) as a new version will be created every time. --- erts/emulator/utils/beam_makeops | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erts/emulator/utils/beam_makeops b/erts/emulator/utils/beam_makeops index 2b7e8a6dde..4a859c3094 100755 --- a/erts/emulator/utils/beam_makeops +++ b/erts/emulator/utils/beam_makeops @@ -753,8 +753,8 @@ sub comment { print "$prefix$line\n"; } } else { - print "$prefix Warning: Do not edit this file. It was automatically\n"; - print "$prefix generated by '$prog' on ", (scalar localtime), ".\n"; + print "$prefix Warning: Do not edit this file.\n"; + print "$prefix Auto-generated by '$prog'.\n"; } if ($lang eq 'C') { print " */\n"; -- cgit v1.2.3