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(-) (limited to 'lib/compiler/src') 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