-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Conditionally pack symbols based on keepNativeSymbols #58565
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
Conversation
|
Tagging subscribers to this area: @dotnet/area-system-io Issue DetailsRelated to #58455 (comment) Source build runs with FYI, I will port this to main as well.
|
| <IsPackable>true</IsPackable> | ||
| <AllowedOutputExtensionsInSymbolsPackageBuildOutputFolder>$(SymbolsSuffix)</AllowedOutputExtensionsInSymbolsPackageBuildOutputFolder> | ||
| <TargetsForTfmSpecificDebugSymbolsInPackage>$(TargetsForTfmSpecificDebugSymbolsInPackage);AddRuntimeSpecificNativeSymbolToPackage</TargetsForTfmSpecificDebugSymbolsInPackage> | ||
| <TargetsForTfmSpecificDebugSymbolsInPackage Condition="'$(keepNativeSymbols)' != 'true'">$(TargetsForTfmSpecificDebugSymbolsInPackage);AddRuntimeSpecificNativeSymbolToPackage</TargetsForTfmSpecificDebugSymbolsInPackage> |
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.
Is keepNativeSymbols an environment variable? Who sets it? Asking as it looks very strange for an msbuild property.
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.
It gets set by source build here
<InnerBuildArgs>$(InnerBuildArgs) /p:KeepNativeSymbols=true</InnerBuildArgs>
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.
Cool. Should we fix the casing then? :)
| <TargetsForTfmSpecificDebugSymbolsInPackage Condition="'$(keepNativeSymbols)' != 'true'">$(TargetsForTfmSpecificDebugSymbolsInPackage);AddRuntimeSpecificNativeSymbolToPackage</TargetsForTfmSpecificDebugSymbolsInPackage> | |
| <TargetsForTfmSpecificDebugSymbolsInPackage Condition="'$(KeepNativeSymbols)' != 'true'">$(TargetsForTfmSpecificDebugSymbolsInPackage);AddRuntimeSpecificNativeSymbolToPackage</TargetsForTfmSpecificDebugSymbolsInPackage> |
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.
Maybe also add a comment here explaining what this does?
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.
Fixed casing and added comment.
ViktorHofer
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.
Awesome, thanks Michael.
|
cc @danmoseley, tell-mode infra change for source-build. |
|
/backport to main |
|
Started backporting to main: https://github.com/dotnet/runtime/actions/runs/1195310445 |
Related to #58455 (comment)
Source build runs with
keepNativeSymbols=truewhich prevents the symbols from being stripped out and placed into a separate .dbg files. This supports the normal workflows used by distro package maintainers. You can read more background here. This change conditionsTargetsForTfmSpecificDebugSymbolsInPackageon thekeepNativeSymbols.FYI, I will port this to main as well once this PR gets approval.