Skip to content

Conversation

@solarkennedy
Copy link
Contributor

This changes the default build type to be "release" https://mesonbuild.com/Builtin-options.html#details-for-buildtype

This optimizes the build and removes debug symbols.

I don't see a speed difference with my timers, but we probably have more work to do there. The build is 65% smaller.

I also added docs for how to make a debug build for real debugging. We can also use the #if !NDBUG macro (meson adds that for free?) for any code we want to gate on a debug build.

This changes the default build type to be "release"
https://mesonbuild.com/Builtin-options.html#details-for-buildtype

This optimizes the build and removes debug symbols.

I don't see a speed difference with my timers, but we probably have more
work to do there. The build is 65% smaller.

I also added docs for how to make a debug build for real debugging.
We can also use the `#if !NDBUG` macro (meson adds that for free?) for
any code we want to gate on a debug build.
@kgilmer
Copy link
Member

kgilmer commented Aug 1, 2025

65!? OMG

@kgilmer kgilmer merged commit 0be2a45 into regolith-linux:main Aug 1, 2025
8 checks passed
@kgilmer
Copy link
Member

kgilmer commented Aug 1, 2025

That's an amazing find, well done @solarkennedy !

@kgilmer
Copy link
Member

kgilmer commented Aug 1, 2025

Is it this? Doesn't seem right if "size" is bytes..

$ readelf -S /usr/bin/ilia
...
Section Headers:
  [Nr] Name              Type             Address           Offset
       Size              EntSize          Flags  Link  Info  Align
       
  [27] .gnu_debuglink    PROGBITS         0000000000000000  00040018
       0000000000000034  0000000000000000           0     0     4

@solarkennedy
Copy link
Contributor Author

This is what i have:

$ ls -lha builddebug/src/ilia 
-rwxrwxr-x 1 kyle kyle 875K Jul 30 09:53 builddebug/src/ilia
$ ls -lha build/src/ilia
-rwxrwxr-x 1 kyle kyle 306K Jul 30 09:54 build/src/ilia

@solarkennedy solarkennedy deleted the release_build branch August 1, 2025 20:35
@kgilmer
Copy link
Member

kgilmer commented Aug 3, 2025

Got it, thanks! The repo on the computer I'm typing on has an older copy of the git repo from before your update:

$ ls -hl build/src/ilia
-rwxrwxr-x 1 kgilmer kgilmer 881K Mar 15 12:38 build/src/ilia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants