I have a really really large package of code that was generated via a code 
generator. Granted the main code that references it I expect to remove a 
lot via DCE or something so the binaries wouldn't be extreme. The code is > 
140MB in the single package which I know sounds extreme. Let's ignore 
practical solutions like reducing code size. I have attempted to compile on 
my Windows machine and the compile process just runs out of memory and is 
unable to allocate anymore. I tried on a 4G VM w/ 8G swap and after almost 
two hours it just gets killed (e.g. "go build example.com/pkg: 
/usr/local/go/pkg/tool/linux_amd64/compile: signal: killed").

This is with Go 1.7, I have not tested with Go 1.8 but will shortly. I was 
hoping the compiler would be able to scale, even on a single package, where 
it could stream the compilation. Are there any flags I should pass to go 
build to make it use less RAM? Is there an effective upper limit on package 
size or any plans to make the compiler not use linearly-more memory based 
on code size? I can give instructions on how to build this extreme amount 
of code too if anyone else wants to try.

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to