Skip to content
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

Add an option to keep native debug symbols #39203

Merged
merged 1 commit into from
Oct 1, 2020

Commits on Sep 30, 2020

  1. Add an option to keep native debug symbols

    When packaging .NET for Linux distributions, the package builders
    generally use a different workflow for shipping symbols to users:
    
    1. The package maintainer builds code with the debug flags (such as
       `-g`) to generate full native debug info and symbols.
    
    2. Nothing is stripped from build by the package maintainer.
    
    3. The build system (`rpmbuild`, `debuild`) removes the debug
       info (or debug symbols) from the code and creates separate
       `-debuginfo` or `-debug` packages that contain just the debug
       symbols.
    
    4. These debug packages are then distributed along with the normal
       packages using the normal Linux distribution mechanisms. This lets
       users install the exact set of debug symbols matching their other
       package.
    
    To support this workflow in dotnet/runtime, we need to add optional
    support for not stripping debug symbols. I used it has follows:
    
        CFLAGS=-g CXXFLAGS=-g ./build.sh --keepnativesymbols true
    
    After this build, the built binaries include all debug symbols.
    
    I can then rely on the distro package build system to identify, strip,
    package and ship the debug info/symbols separately.
    
    See dotnet#3781 and
    dotnet/source-build#267 for more details on
    the background and motivation.
    
    For some related fixes, see:
    
    - dotnet/coreclr#3445
    - dotnet/corefx#24979
    omajid committed Sep 30, 2020
    Configuration menu
    Copy the full SHA
    2ff2c5b View commit details
    Browse the repository at this point in the history