mirror of
https://git.proxmox.com/git/wasi-libc
synced 2025-07-13 18:19:09 +00:00
![]() * Link `populate_args` only if we actually need command-line arguments. This avoids linking in the argv/argc initialization code, and the __wasi_args_sizes_get and __wasi_args_get imports, in programs that don't use command-line arguments. The way this works is, if the user writes `int main(int argc, char *argv[])`, the argument initialization code is loaded, and if they write `int main(void)`, it's not loaded. This promotes the `__original_main` mechanism into an effective contract between the compiler and libc, which wasn't its original purpose, however it seems to fit this purpose quite well. * Document that `__original_main` may be the user's zero-arg `main`. |
||
---|---|---|
.. | ||
common | ||
include | ||
libc |