-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Open
Description
After #120953 added Swift code to System.Security.Cryptography.Native.Apple, publishing NativeAOT tools (ILCompiler, crossgen2) on macOS fails with dsymutil errors about missing module cache files (.pcm).
The Swift code was compiled with -g which includes module debug information. When dsymutil processes the final linked binary, it looks for .pcm files that were in a temporary build cache and fails.
Current Workaround
PR #123386 implements a two-part fix:
-
Immediate workaround: Set
StripSymbols=falsefor Apple platforms in:src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csprojsrc/coreclr/tools/aot/crossgen2/crossgen2_publish.csproj
-
Long-term fix: Changed Swift compilation to use
-gline-tables-onlyinstead of-gin:src/native/libs/System.Security.Cryptography.Native.Apple/CMakeLists.txt
Action Needed
Once a new Microsoft.NETCore.App.Runtime.NativeAOT.osx-arm64 NuGet package is published with the CMakeLists.txt fix, we should:
- Remove the
StripSymbols=falseworkaround from the .csproj files - Re-enable symbol stripping for macOS NativeAOT publish builds
Related
- Original issue: [main] Source code updates from dotnet/dotnet #123386
- Root cause: 6ab804e
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status