Repository navigation
Description
RStudio is now built with debug information using CMake's RelWithDebInfo target, which produces a release build that nonetheless includes debug symbols. Those debug symbols are uploaded to Sentry.io, the service that provides our crash handling.
The executables are then stripped before being included in RStudio's release binaries.
Lines 317 to 342 in 6a2405d
| macro(add_stripped_executable _target) | |
| add_executable(${_target} ${ARGN}) | |
| # only strip debug info in release package builds | |
| if(RSTUDIO_PACKAGE_BUILD AND CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo) | |
| if(UNIX AND NOT APPLE) | |
| # strip debug info | |
| add_custom_command(TARGET ${_target} POST_BUILD | |
| COMMAND objcopy --only-keep-debug ${_target} ${_target}.debug | |
| COMMAND objcopy --strip-debug --strip-unneeded ${_target} | |
| COMMAND objcopy --add-gnu-debuglink=${_target}.debug ${_target} | |
| COMMENT "Stripping ${_target}") | |
| elseif(APPLE) | |
| if(${ARGV1} STREQUAL "MACOSX_BUNDLE") | |
| set(STRIP_TARGET "${_target}.app/contents/MacOS/${_target}") | |
| else() | |
| set(STRIP_TARGET "${_target}") | |
| endif() | |
| add_custom_command(TARGET ${_target} POST_BUILD | |
| COMMAND dsymutil -o ./${_target}.dSYM ${STRIP_TARGET} | |
| COMMAND strip ${STRIP_TARGET} | |
| COMMENT "Stripping ${STRIP_TARGET}") | |
| endif() | |
| endif() | |
| define_source_file_names("${_target}") | |
| endmacro(add_stripped_executable) |
However, even though we produce the debug symbols during the build, there is no way for customers or even RStudio's development team to get a hold of the symbols for a particular build. They can be downloaded from Sentry, but only one file at a time.
It would be unnecessary to provide the debug symbols in the release builds, but it would be very helpful to make a package of symbols available separately for each release to aid in debugging thornier issues in the wild.
Activity