tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: All packages that use Meson are built with -O0



Am 11.08.24 um 20:46 schrieb Thomas Klausner:

> and I don't remember you mentioning which package you
> were trying.

I so far saw this with:

  databases/objpgsql
  databases/objsqlite3
  security/cryptopassphrase

What they all have in common is that they use clang over gcc.

Now that you mention devel/glib2, I also tried that:

niflheim glib2> grep -c O0 work/.work.log
724

So even there I have it (this is on Linux). NetBSD as well:

nil glib2> grep -c O0 work/.work.log
744

Reading https://mesonbuild.com/Builtin-options.html under 'Details for
buildtype' I'm not sure why we have 'plain' as default.

Yeah, plain is also … weird. But yeah, if you read the documentation carefully, it actually becomes clear that plain has no optimizations :/

I agree that 'release' would be a better default.

release is -O3. Are we going to just say we're fine with that, assuming that software that uses Meson is tested with release and hence -O3?

If we want no debug and -O2, the solution would be the commit I linked (you can just have no buildtype at all).

I wonder, what is the default if we pass no buildtype?
Default value is documented as "debug". "debug" is documented as
"-Ddebug=true -Doptimization=0"

--
Jonathan


Home | Main Index | Thread Index | Old Index