<div dir="ltr"><div><span style="font-size:12.8000001907349px">I</span><span style="font-family:arial,helvetica,sans-serif;font-size:12.8000001907349px">t was all due to a missing -split-objs in Jeremy's 7.8 build.</span></div><div><span style="font-family:arial,helvetica,sans-serif;font-size:12.8000001907349px"><br></span></div>I updated the user's guide. The section on -split-objs now reads, with the part that is new in italic: <div><br></div><div><dt><span class="">
<code class="">-split-objs</code>
<a class="" name="idp59783408"></a>
</span></dt><dd><p>Tell the linker to split the single object file that
would normally be generated into multiple object files,
one per top-level Haskell function or type in the module.
This only makes sense for libraries, where it means that
executables linked against the library are smaller as they only
link against the object files that they need. However, assembling
all the sections separately is expensive, so this is slower than
compiling normally. <i>Additionally, the size of the library itself </i><i>(the .a file) can be a factor of 2 to 2.5 </i><i>larger. </i>We use this feature for building GHC's libraries.</p><div><br></div><p><br></p></dd></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 6, 2015 at 11:49 AM, Simon Peyton Jones <span dir="ltr"><<a href="mailto:simonpj@microsoft.com" target="_blank">simonpj@microsoft.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Just to check, can someone summarise the conclusion of this thread? Was it all due to -fsplit-objs? If so, should we add some notes to the user manual to explain what may happen if you use -fsplit-objs? What was the business about Cabal?<br>
<span class="HOEnZb"><font color="#888888"><br>
Simon<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
| -----Original Message-----<br>
| From: Glasgow-haskell-users [mailto:<a href="mailto:glasgow-haskell-users-">glasgow-haskell-users-</a><br>
| <a href="mailto:bounces@haskell.org">bounces@haskell.org</a>] On Behalf Of Jeremy<br>
| Sent: 05 April 2015 20:30<br>
| To: <a href="mailto:glasgow-haskell-users@haskell.org">glasgow-haskell-users@haskell.org</a><br>
| Subject: Re: Binary bloat in 7.10<br>
|<br>
| Thomas Miedema wrote<br>
| > That suggestion was completely misguided. Compiling with `-split-objs`<br>
| > makes a library _grow_ in size, but makes executables that link<br>
| > against it _smaller_.<br>
| ><br>
| > All these numbers are not far off from the ones you were getting. I<br>
| > think you have been comparing a 7.8.4 build of Cabal without split<br>
| > objects, with a 7.10.1 build of Cabal with split objects.<br>
| ><br>
| > I don't think there is a bug here.<br>
|<br>
| My GHC build is now back to the 7.8-era size. Thank you!<br>
|<br>
| I was wondering why programs compiled with my GHC 7.8 build were bigger<br>
| than if I used an official build. Perhaps a bug in the 7.8 build system<br>
| had turned off SplitObjs.<br>
|<br>
|<br>
|<br>
| --<br>
| View this message in context:<br>
| <a href="http://haskell.1045720.n5.nabble.com/Binary-bloat-in-7-10-" target="_blank">http://haskell.1045720.n5.nabble.com/Binary-bloat-in-7-10-</a><br>
| tp5768067p5768274.html<br>
| Sent from the Haskell - Glasgow-haskell-users mailing list archive at<br>
| Nabble.com.<br>
| _______________________________________________<br>
| Glasgow-haskell-users mailing list<br>
| <a href="mailto:Glasgow-haskell-users@haskell.org">Glasgow-haskell-users@haskell.org</a><br>
| <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users</a><br>
_______________________________________________<br>
Glasgow-haskell-users mailing list<br>
<a href="mailto:Glasgow-haskell-users@haskell.org">Glasgow-haskell-users@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users</a><br>
</div></div></blockquote></div><br></div>