emscripten-core / emscripten-core/emscripten
Duplicate main and __original_main
Open
wontfix
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
It looks like if one builds with a main that is of form `int main(){...}`, there will be this kind of stub
```wast
(func $main (; 3 ;) (param $0 i32) (param $1 i32) (result i32)
(call $__original_main)
)
(func $__original_main (; 5 ;) (result i32)
...
```
that will be generated, but not inlined away even in -O3. Is that something that would be possible to optimize away?
Contributor guide
Assessment
This issue has not been assessed yet.