Skip to content

NativeAOT-LLVM: Wasm separate DWARF debug to different file#2264

Closed
yowl wants to merge 1 commit intodotnet:feature/NativeAOT-LLVMfrom
yowl:wasm-separate-debug
Closed

NativeAOT-LLVM: Wasm separate DWARF debug to different file#2264
yowl wants to merge 1 commit intodotnet:feature/NativeAOT-LLVMfrom
yowl:wasm-separate-debug

Conversation

@yowl
Copy link
Copy Markdown
Contributor

@yowl yowl commented Apr 22, 2023

This PR utilises gseparate-dwarf to move the DWARF metadata to a separate file to reduce the main wasm size.

Debugging still works

image

@jkotas jkotas added the area-NativeAOT-LLVM LLVM generation for Native AOT compilation (including Web Assembly) label Jun 20, 2023
@yowl yowl force-pushed the wasm-separate-debug branch from da00273 to 3c9e1ca Compare January 14, 2024 01:18
@yowl
Copy link
Copy Markdown
Contributor Author

yowl commented Apr 28, 2024

With this we dont gain much:

HelloWasm debug, not split 28,545 KB, split 26,081 + 2,352 (dwp)
HelloWasm release not split 10,647 KB, split 8,826 + 1,578 (dwp)

Investigate llvm/llvm-project#55538 and what is required to strip all DI.

@SingleAccretion
Copy link
Copy Markdown

SingleAccretion commented Oct 9, 2024

@yowl I've just been randomly reading emmc --help, and came to realize that if we use the option in the PR's description (emcc -gseparate-dwarf, not -gsplit-dwarf), we will have the "PDB-like" experience we want, at least on browser.

@yowl
Copy link
Copy Markdown
Contributor Author

yowl commented Oct 9, 2024

oh lol, thanks I will try it !

# Conflicts:
#	src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets
@yowl yowl force-pushed the wasm-separate-debug branch from 1e7e547 to 989817a Compare November 15, 2024 01:00
@yowl
Copy link
Copy Markdown
Contributor Author

yowl commented Nov 15, 2024

rebased, but wasi-sdk does not have llvm-dwp so will need to look into that first

@yowl yowl closed this Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-NativeAOT-LLVM LLVM generation for Native AOT compilation (including Web Assembly)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants