Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Enable source/line info on "release" builds #3445

Merged
merged 1 commit into from
Mar 1, 2016

Conversation

mikem8361
Copy link
Member

The symbol info will be stripped and put into a separate *-dbg by dotnet cli (soon).

The symbol info will be stripped and put into a separate *-dbg by dotnet cli (soon).
@mikem8361
Copy link
Member Author

@jkotas and @janvorli could you review?

@jkotas
Copy link
Member

jkotas commented Mar 1, 2016

LGTM

mikem8361 added a commit that referenced this pull request Mar 1, 2016
Enable source/line info on "release" builds
@mikem8361 mikem8361 merged commit d0d5891 into dotnet:master Mar 1, 2016
@mikem8361 mikem8361 deleted the buildsymbols branch March 1, 2016 21:58
jkotas pushed a commit to dotnet/corefx that referenced this pull request Nov 1, 2017
The windows build already includes /Zi /Zl as part of commit 920fd2f
(PR #7840). It looks like it was simply missed on Unix.

This change also makes the native debug information closer to what
CoreCLR does on all platforms. See
dotnet/coreclr#3445 for more information.

This is also needed for the end-to-end debuginfo generation as part of
source-build. See dotnet/source-build#267
omajid added a commit to omajid/dotnet-runtime that referenced this pull request Sep 30, 2020
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
jkotas pushed a commit to dotnet/runtime that referenced this pull request Oct 1, 2020
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 #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
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
)

The windows build already includes /Zi /Zl as part of commit 920fd2f
(PR dotnet/corefx#7840). It looks like it was simply missed on Unix.

This change also makes the native debug information closer to what
CoreCLR does on all platforms. See
dotnet/coreclr#3445 for more information.

This is also needed for the end-to-end debuginfo generation as part of
source-build. See dotnet/source-build#267

Commit migrated from dotnet/corefx@efe7652
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants