I searched for the latest information on creating compact Go executables without success. Most of the information seems to be several years old.
My program: The standard hello world found on Rosettacode.org. With Fortran, I get an exe file under 100 KB. With Go, the EXE file has a whopping 2400KB.
My questions are: are there compiler switches or pragmas that I should use? Are there any other tools or tricks that I don't know about (I start with Go). What are Go's future plans for executable file size? What is it under Linux - the same thing? What happens to exe files on large programs?
Background: I am using go 1.5 installed on Windows 7. My project writes (actually transfers from other languages) some command-line programs. With 20 or more large Go exe files, you eat a lot of space. Well, I know that space is cheap, so I can live with it. However, I believe that clarity in this matter will help many people.
source
share