Skip to content

[ILLink] TrimMode=full is trimming UnmanagedCallersOnly in the final app #106627

Closed

Description

@pavelsavara

To reproduce

  • build runtime for WASI target
  • ./dotnet.cmd build /p:TargetOS=wasi /p:TargetArchitecture=wasm /p:Configuration=Debug /t:RunSample .\src\mono\sample\wasi\native\ /p:TrimMode=full
  • note I will apply workaround to the sample soon

Actual result
undefined symbol: ManagedFunc

Expected
ManagedFunc returned 42

Workaround
Use ilink descriptor

    <type fullname="Sample.Test">
        <method signature="System.Int32 MyExport(System.Int32)" />
    </type>

Activity

  1. added
    area-Tools-ILLink
    on Aug 19, 2024
  2. added
    untriaged
    on Aug 19, 2024
  3. dotnet-policy-service commented on Aug 19, 2024

    @dotnet-policy-service
    Contributor

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

  4. sbomer commented on Aug 19, 2024

    @sbomer
    Member

    Duplicate of #101434

  5. removed
    untriaged
    on Aug 19, 2024
  6. locked and limited conversation to collaborators on Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-Tools-ILLink

    Type

    No type

    Projects

    • Status
      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions