From 23dfc06144c42693ea92f6ab7e21d20d0cd6fec3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= <bjorn@erlang.org>
Date: Fri, 5 May 2017 06:11:21 +0200
Subject: Make 'slim' slim again

The undocumented compiler option 'slim' is used when compiling
the primary bootstrap. The purpose is to make the bootstrap smaller
and to avoid unnecessary churn in the git repository. That is,
the BEAM file should be different only if the actual code in the
file is different, and not if it has merely been re-compiled on
a different computer.

Two commits have fattened the 'slim' option. In 36f7087ae0f,
extra chunks are included even in slim BEAM files. In dfb899c0229f7,
the "Dbgi" were added as an extra chunk, causing it to be included
in slim files.

Make 'slim' slim again by only including the essential chunks and
the attribute chunk (as was the case before the {extra,...} option
was added).
---
 lib/compiler/src/beam_asm.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'lib/compiler')

diff --git a/lib/compiler/src/beam_asm.erl b/lib/compiler/src/beam_asm.erl
index 6d5071271c..c35efdfc9d 100644
--- a/lib/compiler/src/beam_asm.erl
+++ b/lib/compiler/src/beam_asm.erl
@@ -194,7 +194,7 @@ build_file(Code, Attr, Dict, NumLabels, NumFuncs, ExtraChunks, SourceFile, Opts,
 
     Chunks = case member(slim, Opts) of
 		 true ->
-		     [Essentials,AttrChunk,CheckedChunks];
+		     [Essentials,AttrChunk];
 		 false ->
 		     [Essentials,LocChunk,AttrChunk,
 		      CompileChunk,CheckedChunks,LineChunk]
-- 
cgit v1.2.3