-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Fix -sEXIT_RUNTIME in MINIMAL_RUNTIME build mode. #25321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…inimal0 suite, e.g. minimal0.test_static_variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The throw
exit(${code})code is not dependent on
EXIT_RUNTIME` so maybe the catch here should not be either?
i.e. do we want the "silently suppress exit exception" to only happen when EXIT_RUNTIME
is set? and otherwise we just let the exit
exception propagate the top level?
Then it would increase code size for no benefit. If user is building with |
#if RUNTIME_DEBUG | ||
dbg(`main() called ${e}.`); // e.g. "main() called exit(0)." | ||
#endif | ||
// Report to Module that the program exited. TODO: Find a way to not emit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrap this in #if expectToReceiveOnModule('onExit')
.
Fix -sEXIT_RUNTIME in MINIMAL_RUNTIME build mode. Fixes 13 tests in minimal0 suite, e.g. minimal0.test_static_variable.