Fix NativeAOT aggregate executable dSYM publish paths - #132018
Fix NativeAOT aggregate executable dSYM publish paths#132018akoeplinger wants to merge 1 commit into
Conversation
Preserve metadata from each expanded dSYM bundle entry when assigning its publish path. Extend the aggregate executable test to exercise and validate the macOS dSYM layout. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 54dd0a45-3f91-4305-a486-fa37b4e25e74
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
|
Tagging subscribers to this area: @agocke, @dotnet/ilc-contrib |
There was a problem hiding this comment.
Pull request overview
This PR fixes how NativeAOT aggregate executable shim dSYM bundle contents are assigned publish-relative paths, ensuring each expanded file under *.dSYM/** keeps its own filename/extension metadata when constructing ResolvedFileToPublish.RelativePath. It also extends the existing aggregate executable test on macOS to generate dSYM bundles and validate that the published paths match the expected dSYM layout.
Changes:
- Update NativeAOT publish logic to compute dSYM recursive publish paths using the expanded file items’ metadata (and a preserved bundle name), avoiding incorrect “collapsed” paths.
- Enable native debug symbols + publishing of output symbols for the aggregate executable test on macOS.
- Add a macOS-only validation target that asserts key dSYM files are published under
Contents/Info.plistandContents/Resources/DWARF/....
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/tests/nativeaot/AggregateExecutableLibrary/AggregateLibrary.csproj | Enables dSYM generation/publish on macOS for the aggregate executable test and adds validation that expected dSYM bundle file paths are present in ResolvedFileToPublish. |
| src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Publish.targets | Adjusts aggregate executable shim dSYM recursive item handling so RelativePath is computed from the recursively-expanded file items (with a preserved bundle-name metadata) rather than batching against the reference item metadata. |
|
Can the symbol servers resolve symbols now from dSYM bundles? If so, we can move our native symbols for things like CoreCLR to use dSYM bundles. |
Summary
HelloExe.dSYM/HelloExe.dll, which can leave non-PE files with a.dllextension in packages.Contents/Info.plistandContents/Resources/DWARFpaths.dotnet/dotnet#8135 enabled publishing the ASP.NET Core NativeAOT tool symbols and exposed this issue during VMR package signing. The underlying publish-path logic came from #128553.
The resulting error was that every bundle file received the same destination:
dotnet-dev-certs.dSYM/dotnet-dev-certs.dllThe files overwrite each other, leaving a ~207-byte YAML relocation file named
.dll. SignTool classifies files by extension, passes it to PEReader and throws:System.BadImageFormatException: Unknown file formatTesting
./build.sh clr+libs -lc release -rc checked./build.sh clr -rc releasesrc/tests/build.sh -Test nativeaot/AggregateExecutableLibrary/AggregateLibrary.csproj -arm64 -release -nativeaotbash artifacts/tests/coreclr/osx.arm64.Release/nativeaot/AggregateExecutableLibrary/AggregateLibrary/AggregateLibrary.shNote
This PR description was generated with GitHub Copilot.