On Sat, Aug 03, 2019 at 07:03:47PM +0200, Michael Biebl wrote: > Hi, > > today I tried compiling systemd v242 (on Debian sid) once using lto > (-Db_lto=true) and once without lto (-Db_lto=false). > > The lto build took approximately twice as long on my laptop (using > dpkg-buildpackage, which introduces a bit of overhead): > > lto: > real 11m22,605s > user 37m9,675s > sys 2m51,041s > > nolto: > real 6m35,615s > user 18m51,782s > sys 2m12,934s > > That's kinda expected. What suprised me though is that using lto > produced larger binaries: I built systemd in F31 (-Doptimization=2 -Db_lto=true/false, and I saw a big increase in binary sizes *before stripping*. After stripping, binaries with lto=true are smaller: $ ls -l build-rawhide{,-lto}/{systemd,src/shared/libsystemd-shared-243.so} 7116384 Aug 6 09:08 build-rawhide/systemd* 11951256 Aug 6 09:07 build-rawhide/src/shared/libsystemd-shared-243.so* 1594912 Aug 6 09:12 build-rawhide-lto/systemd* 3167096 Aug 6 09:11 build-rawhide-lto/src/shared/libsystemd-shared-243.so* $ strip build-rawhide{,-lto}/{systemd,src/shared/libsystemd-shared-243.so} $ ls -l build-rawhide{,-lto}/{systemd,src/shared/libsystemd-shared-243.so} 1439640 Aug 6 09:19 build-rawhide/systemd* 2806456 Aug 6 09:19 build-rawhide/src/shared/libsystemd-shared-243.so* 1370008 Aug 6 09:19 build-rawhide-lto/systemd* 2806288 Aug 6 09:19 build-rawhide-lto/src/shared/libsystemd-shared-243.so* Zbyszek _______________________________________________ systemd-devel mailing list systemd-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/systemd-devel