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 ILLink option to preserve symbol paths #103295

Merged
merged 5 commits into from
Jun 17, 2024
Merged

Conversation

sbomer
Copy link
Member

@sbomer sbomer commented Jun 11, 2024

This adds ILLink support for --preserve-symbol-paths, which is set when DeterministicSourcePaths is true.
This setting will preserve the original pdb path from the inputs by using a custom symbol writer (see dotnet/cecil#183 (comment)).

Confirmed that this fixes #99594. No tests here because I think the best way to test this is either via a checked-in binary (which needs more infrastructure, mentioned in #78344) or a testcase that uses the SDK to build a test assembly with DeterministicSourcePaths. For now I plan to add a test in dotnet/sdk once this change flows.

@sbomer sbomer requested a review from marek-safar as a code owner June 11, 2024 16:56
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-Tools-ILLink .NET linker development as well as trimming analyzers label Jun 11, 2024
@dotnet-policy-service dotnet-policy-service bot added the linkable-framework Issues associated with delivering a linker friendly framework label Jun 11, 2024
@sbomer sbomer changed the title Preserve symbol paths when DeterministicSourcePaths is true Add ILLink option to preserve symbol paths Jun 11, 2024
Copy link
Contributor

Tagging subscribers to this area: @agocke, @sbomer, @vitek-karas
See info in area-owners.md if you want to be subscribed.

Otherwise writing a module will try to use the symbol writer provider,
but the underlying DefaultSymbolWriterProvider throws when the
module has no symbol reader (this is the case when there were no
symbols corresponding to the module).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Tools-ILLink .NET linker development as well as trimming analyzers linkable-framework Issues associated with delivering a linker friendly framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Not all built assemblies have deterministic source paths
2 participants