<div dir="ltr"><div>I only build with swr and llvmpipe.  I generally don't have use for the GPU drivers so my configure line is typically:<br><span style="font-family:monospace,monospace"><br>  --enable-opengl --disable-gles1 --disable-gles2<br>  --disable-va --disable-gbm --disable-xvmc --disable-vdpau<br>  --enable-shared-glapi<br>  --disable-dri --with-dri-drivers=<br>  --enable-gallium-llvm --enable-llvm-shared-libs<br>  --with-gallium-drivers=swrast,swr<br>  --disable-egl --disable-gbm --with-egl-platforms=<br>  --enable-gallium-osmesa<br>  --enable-glx</span><br><br></div>With gcc 5.3.1 I end up with lib{GL,OSMesa}.so @ 44M and libswrAVX{,2}.so @ 70M.  With flto turned on it drops WAY down to  lib{GL,OSMesa}.so @ 13M and libswrAVX{,2}.so @ 18M<div><div><br></div></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">- Chuck<br></div></div></div>
<br><div class="gmail_quote">On Tue, May 31, 2016 at 10:57 AM, Emil Velikov <span dir="ltr"><<a href="mailto:emil.l.velikov@gmail.com" target="_blank">emil.l.velikov@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On 31 May 2016 at 15:34, Chuck Atkins <span dir="ltr"><<a href="mailto:chuck.atkins@kitware.com" target="_blank">chuck.atkins@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I've been using lto for the past several weeks not for performance reasons but to reduce the resulting binary size which has grown to be rather substantial.  I usually set "-flto -ffat-lto-objects -flto-odr-type-merging" in the CFLAGS and CXXFLAGS env vars prior to configure and have yet to experience any problems with the files in mapi./<span><font color="#888888"><br></font></span></div><div class="gmail_extra"><span><font color="#888888"><br clear="all"></font></span></div></blockquote></span><div>Thanks for the confirmation Chuck. It matches what I'm seeing when building using only "-flto".</div><div><br></div><div>On the binary size topic - please make sure you include only the drivers that you need in --with-dri-drivers and --with-gallium-drivers. Otherwise you'll end up with 'megadrivers' (all the drivers in a single binary) with hardlinks for each driver instance. The latter is for backwards compatibility.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-Emil</div></font></span></div></div></div>
</blockquote></div><br></div>