about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/builder.rs
diff options
context:
space:
mode:
authorDan Gohman <dev@sunfishcode.online>2022-12-08 10:35:46 -0800
committerDan Gohman <dev@sunfishcode.online>2022-12-08 13:15:40 -0800
commit98ae83daae67e9e7663b8345eced1de8c667271f (patch)
treea16a2d03ec22b42923c678823895692cb4cd4290 /compiler/rustc_codegen_llvm/src/builder.rs
parent7632db0e87d8adccc9a83a47795c9411b1455855 (diff)
downloadrust-98ae83daae67e9e7663b8345eced1de8c667271f.tar.gz
rust-98ae83daae67e9e7663b8345eced1de8c667271f.zip
Mangle "main" as "__main_void" on wasm32-wasi
On wasm, the age-old C trick of having a main function which can either have
no arguments or argc+argv doesn't work, because wasm requires caller and
callee signatures to match. WASI's current strategy is to have compilers
mangle main's name to indicate which signature they're using. Rust uses the
no-argument form, which should be mangled as `__main_void`.

This is needed on wasm32-wasi as of #105395.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/builder.rs')
0 files changed, 0 insertions, 0 deletions