#15116 closed enhancement (fixed)
add --buildtype=release for meson
Reported by: | Xi Ruoyao | Owned by: | blfs-book |
---|---|---|---|
Priority: | normal | Milestone: | 11.0 |
Component: | BOOK | Version: | git |
Severity: | normal | Keywords: | |
Cc: |
Description ¶
https://mesonbuild.com/Running-Meson.html says meson defaults to debug build. No optimization will be used in this mode (even -O2
is not enabled). This does not make sense unless you want to debug the resulted binary.
We should add --buildtype=release
when we update a package using meson next time.
Change History (5)
comment:1 by , 4 years ago
follow-up: 3 comment:2 by , 4 years ago
I just added this to the Chapter 9 packages that need it. The build sizes for the packages decreased significantly, generally range of about 50%. When I checked libumockdev.so.0.3.0, I'll note that it still is not stripped of debugging info.
comment:3 by , 4 years ago
Replying to Bruce Dubbs:
I just added this to the Chapter 9 packages that need it. The build sizes for the packages decreased significantly, generally range of about 50%. When I checked libumockdev.so.0.3.0, I'll note that it still is not stripped of debugging info.
I saw a similar thing with gucharmap: it supposedly still defaults to release but had debug info (although meson's report says it will not contain debug info).
Experimentation showed it did appear to be a release build (-O3 showed in a verbose build), and adding --strip slimmed it down. No idea exactly what information now gets included without the strip.
comment:4 by , 4 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Finished doing this for BLFS. There were a lot of packages that needed it. The final commit was b9fc02af1f10d9832fe411cebbc09eb2fb095cda but there were a few others.
A couple of meson packages did not need this. gnome-backgrounds only installs data and mutter needs --buildtype=debugoptimized for tests.
I added
--buildtype=release
for every package I've tested with it.mutter with
--buildtype=release
runs OK, but the test depends on debug. So added--buildtype=debugoptimized
.Some packages (for e. g. gnome-background) obviously don't contain any source code, so they are skipped.