You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (go env)?
set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GORACE=
set GOROOT=C:\Go
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=...
What did you do and what happened?
I'm learning Go and I decided to make a few little programs to get comfortable with the language. Usually the executables are ~1MB. But when I tried to compile the following program, the compilation took a long time and the executable was ~800MB. https://play.golang.org/p/EK8zDu5vVQN
What did you expect to see?
I expected the executable to be ~1MB, because I tried a similar program, but without the explicit initialization of the first element of the array to 1, and it worked fine. Like the other times, the executable was ~1MB. https://play.golang.org/p/LM9TBaQcRIo
The text was updated successfully, but these errors were encountered:
This is a duplicate of issue #17378 (cmd/compile: large arrays cause large binaries and toolchain errors); so I'm closing this thread in favour of the old one.
ALTree
changed the title
'go build' takes too long and creates huge executable
cmd/compile: go build takes too long and creates huge executable with big static array
Apr 6, 2018
What version of Go are you using (
go version
)?go version go1.10.1 windows/amd64
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GORACE=
set GOROOT=C:\Go
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=...
What did you do and what happened?
I'm learning Go and I decided to make a few little programs to get comfortable with the language. Usually the executables are ~1MB. But when I tried to compile the following program, the compilation took a long time and the executable was ~800MB.
https://play.golang.org/p/EK8zDu5vVQN
What did you expect to see?
I expected the executable to be ~1MB, because I tried a similar program, but without the explicit initialization of the first element of the array to 1, and it worked fine. Like the other times, the executable was ~1MB.
https://play.golang.org/p/LM9TBaQcRIo
The text was updated successfully, but these errors were encountered: