See: https://forums.gentoo.org/viewtopic-t-1164350.html Glib is always built with support for libmount and nss. This compiles 100 extra files. This is about one fifth of what glib compiles. Can a USE flag to toggle the corresponding build options be added?
libmount from util-linux is used to figure out more reliably the list of already mounted filesystems and mountable filesystems. It's only use is within gio/gunixmounts.c and by disabling libmount you still compile exactly the same amount of files. glib does not depend on NSS, nor has any references to it whatsoever. In conclusion, I'm not sure what benefit it would have to cripple some of the API a little bit to avoid a dependency that everyone on linux already has installed in practice.
Sorry, it was nls instead of nss. I have MYMESONARGS="-Dlibmount=disabled -Dnls=disabled" in my portage env. With this, glib compiles 443 files. Without this, glib compiles 543 files With only this, glib compiles 443 files. MYMESONARGS="-Dnls=disabled" With only this, glib compiles 543 files. MYMESONARGS="-Dlibmount=disabled"
Translations is not optional for it, as far as I'm concerned. The amount of extra "compiled" files is 100 *.po files getting converted to *.mo files that get installed. Having LINGUAS work at build time for meson is an open issue, in practice dependent on someone writing a ninja feature to make a sane solution, meanwhile you have your INSTALL_MASK and other ways if you really don't want translations for some languages.
Got it. It's all fine if it doesn't have a runtime impact. Thank you for clarifying.