Add option to support split debug informations
- Dominant language
- Python
- Stars
- 6.6k
- Forks
- 1.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 33
Description
# Use-case
The buildtype debugoptimized is useful to allow having debug info even for release build.
On some toolchain (ex: gcc) it is possible to split that debug info from the binary, allowing to only distribute the binary to the user. This have space and confidentiality advantages.
# Current situtation
Currently, the job must be done manually on each executable/library. This means the following command on each:
> objcopy --only-keep-debug BIN .debug/BIN.debug
> strip --strip-debug --strip-unneeded BIN
> objcopy --add-gnu-debuglink=.debug/BIN.debug BIN.debug
# Suggested feature
Add workspace option `splitDebug` (as an alternative to simply `split`) that would do such an operation on each binary without the user having to do anything.
Note: strip and objcopy may be interchangeable.
Contributor guide
Research direction
Start by tracing the existing `split` workspace option and the handling of the `debugoptimized` buildtype. Check how Meson identifies executable and library outputs, then compare the requested `objcopy` and `strip` steps with supported toolchain behavior. Done means a `splitDebug` option applies the operation consistently to each binary without manual commands.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100