I originally posted most of this to lfs-dev, thinking that since meson was in LFS there must be something there which used it. But AFAICS everything which uses meson is in BLFS, so moving this to here, with some updated details.
I was galancing at phoronix this afternoon (often taken over by the peanut gallery, or dubious measurements, but sometimes interesting). https://www.phoronix.com/scan.php?page=news_item&px=Fedora-Mesa-Meson-Debug-Build AFAICS we do NOT specify buildtype on any meson packages, but on cmake we usually specify Release builds ? It appears that fedora were specifying 'plain', and that left debug assertions in the build, which slowed down some things in games (e.g. loading levels). https://bugs.freedesktop.org/show_bug.cgi?id=109939#c16 From that, the default for *mesa* is 'debugoptimized' which seems to be what we are using. I've now got verbose output for my test builds (ninja -v) and the default setup does not specify -DNDEBUG. On the current machine's setup (not building mesademos for this, I think I'm enabling everything in mesa, including wayland backend): Build by the book, with logs not in the measurement: mesa-19.0.0 1.5 GB DESTDIR 611 MB Specifying -Dbuildtype=release: mesa-19.0.0 374 MB DESTDIR 91 MB That uses -O3 (there are suggestions distros might not want to use that), and it passes -DNDEBUG. On my real build at the weekend, the log was unclear about the commands actually used (hence my need for ninja -v), but it noticed my CFLAGS and CXXFLAGS (-O2 -march=native). Doing another release build, but passing those (some parts are C, others are C++) the initial -O3 for the release is early in the arguments, my -O2 -march=native come much later so take effect. With that (although I probably only want to pass the march part if doing a release build on a fast machine) I get mesa-19.0.0 345 MB DESTDIR 75 MB. Summary: for mesa, -Dbuildtype=release looks like the way to go. The meson docs are at https://mesonbuild.com/Running-Meson.html and my reading of that page suggests that 'debugoptimized' is not always the default. Will look at some other meson packages later, if there is any interest in this. ĸen -- It is said that there are two great unsolved problems in computer science: naming, cache invalidation, and off-by-one errors. -- Ben Bullock -- http://lists.linuxfromscratch.org/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
