Skip to content

Pass --compress-relocations when WasmNativeStrip is specified - #137122

Merged
MichalStrehovsky merged 1 commit into
mainfrom
MichalStrehovsky-patch-1
Nov 7, 2026
Merged

MichalStrehovsky merged 1 commit into
mainfrom
MichalStrehovsky-patch-1

Conversation

@MichalStrehovsky

Copy link
Copy Markdown
Member

WASM uses variable size integers and we leave plenty of space in them for fixups. Once linker fixes these up, it may find out we left too much space. With --compress-relocations linker will rewrite method bodies to recover the space. This apparently breaks debug info, so we can only do it if debug info is not relevant. 5.5% size saving.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara
See info in area-owners.md if you want to be subscribed.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
12 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

@MichalStrehovsky
MichalStrehovsky merged commit bcd9210 into main Nov 7, 2026
116 of 119 checks passed
@MichalStrehovsky
MichalStrehovsky deleted the MichalStrehovsky-patch-1 branch November 7, 2026 04:36
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arch-wasm WebAssembly architecture area-NativeAOT-coreclr

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants