executable size differs after Compile and Build lazarus / 62-General ---------------------------------------------------------------------- mm7 · 2020-06-13 18:39 If I Build, executable size is 52 MB. If I Compile after this, executable size is 48 MB. The only difference is "-B" (Build all modules) for Build. Does it mean Compile does not link modules that have been built before? In doc https://edoras.sdsu.edu/doc/fpc/user.pdf, pg 28 stated: Quote-B Re-compile all used units, even if the unit sources didn’t change since the last compilation. so, what is not included into Compiled executable? Linux, FPC 3.0.4 ---------------------------------------------------------------------- jamie · 2020-06-13 18:47 Have you tried that using a External Debug file? ---------------------------------------------------------------------- howardpc · 2020-06-13 19:57 Perhaps your Build command does not include smartlinking, but your Compile command does? ---------------------------------------------------------------------- mm7 · 2020-06-13 21:22 > Have you tried that using a External Debug file? yes, the difference is in the External Debug file but, why? > Perhaps your Build command does not include smartlinking, but your Compile command does? Again, I've compared the commands. The only difference is -B. ---------------------------------------------------------------------- PascalDragon · 2020-06-14 09:11 You can add the -Xm option to get a map file that contains a listing of everything that is contained. You can then compare the two files to see what gets left out. ---------------------------------------------------------------------- mm7 · 2020-06-14 14:59 I've added -Xm. No .map generated. ---------------------------------------------------------------------- Cyrax · 2020-06-14 17:05 https://bugs.freepascal.org/view.php?id=33982 Support for generating map file under Linux OS was added recently to the trunk and probably merged to next release version (3.2.0) of FPC compiler. 3.0.4 doesn't have such functionality but maybe mm7 can add extra linker option (-k"-Map out.map") to generate it. ---------------------------------------------------------------------- mm7 · 2020-06-14 21:55 got maps. lots of differences there. For example in build map there are more $_Ld123 records Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i grep '\$_Ld[0-9]\+' out.map.cmp | wc -l137536 grep '\$_Ld[0-9]\+' out.map.bld | wc -l146786 ---------------------------------------------------------------------- mm7 · 2020-06-16 15:25 So, why debug info would be different?