mirror of
https://github.com/siemens-mobile-hacks/llvm-c166.git
synced 2026-11-26 06:28:13 +00:00
On WebAssembly clang only wires a 0- or 2-argument main to the program entry point: EmitMainVoidAlias emits the __main_void alias for a no-argument main, and the 2-argument form is mangled to __main_argc_argv. A 3-argument main(argc, argv, envp) matches neither, so main is never connected to the entry point and is left as an undefined-weak stub whose body is `unreachable`. The affected inferiors trap with "Exception: unreachable" before reaching main (even when run outside the debugger) so any test using them fails on wasm. Drop the unused third parameter, and where the environment is actually iterated read it from `environ` instead. The inferiors now run on WebAssembly and behave identically on other platforms. |
||
|---|---|---|
| .. | ||
| command_plugin | ||
| python_os_plugin | ||