Skip to content

Remove StripSymbols workaround for macOS NativeAOT publish once Swift module debug fix is available #123687

Closed

Description

@steveisok

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:

  1. Immediate workaround: Set StripSymbols=false for Apple platforms in:

    • src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj
    • src/coreclr/tools/aot/crossgen2/crossgen2_publish.csproj
  2. Long-term fix: Changed Swift compilation to use -gline-tables-only instead of -g in:

    • 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:

  1. Remove the StripSymbols=false workaround from the .csproj files
  2. Re-enable symbol stripping for macOS NativeAOT publish builds

Related

Activity

  1. added
    untriaged
    on Jan 27, 2026
  2. dotnet-policy-service commented on Jan 27, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @agocke, @dotnet/ilc-contrib
    See info in area-owners.md if you want to be subscribed.

  3. added this to the 11.0.0 milestone on Jan 27, 2026
  4. removed
    untriaged
    on Jan 28, 2026
  5. jkoritzinsky commented on Feb 3, 2026

    @jkoritzinsky
    Member

    The short and long term fixes have flowed back to dotnet/runtime in #123687.

    After the next rebootstrap, we can remove the StripSymbols workarounds.

  6. self-assigned this
    on Feb 11, 2026
  7. locked and limited conversation to collaborators on May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

  • Status
    No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions