This repository was archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Generate debuginfo on all builds on unix platforms #24979
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The windows build already includes /Zi /Zl as part of commit 920fd2f (PR dotnet#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
Member
Author
jkotas
approved these changes
Oct 31, 2017
Member
jkotas
left a comment
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.
Thanks
omajid
added a commit
to omajid/dotnet-source-build
that referenced
this pull request
Nov 1, 2017
This patch makes coreclr and core-setup leave debug symbols in their built native code instead of stripping it out. After this patch, native symbols are only missing in corefx. A separate PR in corefx will take care of that: dotnet/corefx#24979 The final dotnet product, after both these fixes, should contain native debug symbols for all native binaries.
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
MichaelSimons
pushed a commit
to dotnet/source-build-externals
that referenced
this pull request
Feb 8, 2022
This patch makes coreclr and core-setup leave debug symbols in their built native code instead of stripping it out. After this patch, native symbols are only missing in corefx. A separate PR in corefx will take care of that: dotnet/corefx#24979 The final dotnet product, after both these fixes, should contain native debug symbols for all native binaries.
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The windows build already includes
/Zi /Zlas 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