Skip to content

Conversation

@MichaelSimons
Copy link
Member

@MichaelSimons MichaelSimons commented Sep 2, 2021

Related to #58455 (comment)

Source build runs with keepNativeSymbols=true which 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 conditions TargetsForTfmSpecificDebugSymbolsInPackage on the keepNativeSymbols.

FYI, I will port this to main as well once this PR gets approval.

@ghost ghost added the area-System.IO label Sep 2, 2021
@ghost
Copy link

ghost commented Sep 2, 2021

Tagging subscribers to this area: @dotnet/area-system-io
See info in area-owners.md if you want to be subscribed.

Issue Details

Related to #58455 (comment)

Source build runs with keepNativeSymbols=true which 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 conditions TargetsForTfmSpecificDebugSymbolsInPackage on the keepNativeSymbols.

FYI, I will port this to main as well.

Author: MichaelSimons
Assignees: -
Labels:

area-System.IO

Milestone: -

<IsPackable>true</IsPackable>
<AllowedOutputExtensionsInSymbolsPackageBuildOutputFolder>$(SymbolsSuffix)</AllowedOutputExtensionsInSymbolsPackageBuildOutputFolder>
<TargetsForTfmSpecificDebugSymbolsInPackage>$(TargetsForTfmSpecificDebugSymbolsInPackage);AddRuntimeSpecificNativeSymbolToPackage</TargetsForTfmSpecificDebugSymbolsInPackage>
<TargetsForTfmSpecificDebugSymbolsInPackage Condition="'$(keepNativeSymbols)' != 'true'">$(TargetsForTfmSpecificDebugSymbolsInPackage);AddRuntimeSpecificNativeSymbolToPackage</TargetsForTfmSpecificDebugSymbolsInPackage>
Copy link
Member

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.

Copy link
Member Author

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>

Copy link
Member

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? :)

Suggested change
<TargetsForTfmSpecificDebugSymbolsInPackage Condition="'$(keepNativeSymbols)' != 'true'">$(TargetsForTfmSpecificDebugSymbolsInPackage);AddRuntimeSpecificNativeSymbolToPackage</TargetsForTfmSpecificDebugSymbolsInPackage>
<TargetsForTfmSpecificDebugSymbolsInPackage Condition="'$(KeepNativeSymbols)' != 'true'">$(TargetsForTfmSpecificDebugSymbolsInPackage);AddRuntimeSpecificNativeSymbolToPackage</TargetsForTfmSpecificDebugSymbolsInPackage>

Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

@ViktorHofer ViktorHofer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks Michael.

@ViktorHofer
Copy link
Member

cc @danmoseley, tell-mode infra change for source-build.

@Anipik Anipik merged commit b8b42ba into dotnet:release/6.0 Sep 2, 2021
@Anipik
Copy link
Contributor

Anipik commented Sep 2, 2021

/backport to main

@github-actions
Copy link
Contributor

github-actions bot commented Sep 2, 2021

Started backporting to main: https://github.com/dotnet/runtime/actions/runs/1195310445

@ghost ghost locked as resolved and limited conversation to collaborators Oct 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants