-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: do not include debug symbols by default #410
Conversation
By default debug symbols are included into the hirte binaries. It should included only for development and tests. GitHub-Issue: #409 Signed-off-by: Douglas Schilling Landgraf <[email protected]>
Just a quick target to use a sed command to include the debug sysmbols and call build target (meson). Signed-off-by: Douglas Schilling Landgraf <[email protected]>
$(MAKE) clean | ||
@sed -i 's/debug=false/debug=true/g' meson.build | ||
$(MAKE) build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please avoid running sed on the files checked into git -- just pass the -Ddebug=true
option to meson setup
, perhaps by making the make build
rule utilize a $(MESONARGS)
variable or something and setting that here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. Also, wouldn't it be sufficient to use meson configure
? For example:
# disable debug
meson configure builddir -Ddebug=false
# enable debug
meson configure builddir -Ddebug=true
This should let you switch without the need to re-setup the project. For the make users, we can also add a new target for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@engelmi that is super nice.
FYI: |
Thinking about it, the direct meson build of hirte is (or should be) only used by developers on the project - and for those it makes a lot of sense to have the debug symbols included by default. Everybody else should get hirte via the RPMs we provide. So if we want to exclude the debug symbols, we should do this in the hirte.spec - in L176 we already statically override options for meson. Not sure, though, if it makes sense since the RPM build also includes debug symbols as far as I know. |
Several notes:
The important option is
But after finishing the build the RPM process extracts debug information from the binaries using find-debuginfo.sh and stores debug information in a standalone package (for example hirte-debuginfo-...rpm). So my comments:
|
Let's imagine another project, like kernel linux (we can pick up another established project), it's C and also shipped in rpm. Still, not enables by default the debug objects. To be honest, it's little weird to see debug=True in the source code released and do a change in the spec. Every distro must be notified to do such change. release v0.4.0: |
Nice explanation but it seems very distro specific solution for a open source project. |
By distro specific you mean RPM? Currently, we'll package hirte only for it (might change in the future).
Again, using meson directly is for developers and usually debug - so having debug symbols as a default just simplifies developer life. The final product is built using a RPM spec (or whatever target might be added) and for this we can set the debug symbols off if needed. Using established projects as a reference is good, but I'd not do everything the same and rather tailor solutions/approaches to our project. |
By default debug symbols are included into the hirte binaries. It should included only for development and tests.
GitHub-Issue: #409
Signed-off-by: Douglas Schilling Landgraf [email protected]