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

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

Closed
pavelsavara opened this issue Aug 19, 2024 · 2 comments
Closed
Labels
area-Tools-ILLink .NET linker development as well as trimming analyzers

Comments

@pavelsavara
Copy link
Member

pavelsavara commented Aug 19, 2024

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>
@pavelsavara pavelsavara added the area-Tools-ILLink .NET linker development as well as trimming analyzers label Aug 19, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Aug 19, 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.

@sbomer
Copy link
Member

sbomer commented Aug 19, 2024

Duplicate of #101434

@sbomer sbomer marked this as a duplicate of #101434 Aug 19, 2024
@sbomer sbomer closed this as completed Aug 19, 2024
@dotnet-policy-service dotnet-policy-service bot removed the untriaged New issue has not been triaged by the area owner label Aug 19, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Sep 19, 2024
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
Projects
Archived in project
Development

No branches or pull requests

2 participants