Skip to content
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

remove all uses of lang_items unstable feature #1950

Merged
merged 1 commit into from
Jun 17, 2020

Conversation

hudson-ayers
Copy link
Contributor

@hudson-ayers hudson-ayers commented Jun 17, 2020

Pull Request Overview

This pull request removes all uses of the lang_items unstable feature, to get us closer to building Tock on stable rust.

Originally, lang_items was required to declare the global panic handler, but that was changed by rust-lang/rust#51366 . After that, we seem to have just kept it around for declaring a dummy eh_personality() implementation, which I understand is not needed if you build with panic=abort (which we do for both release and debug builds). see: https://os.phil-opp.com/freestanding-rust-binary/

Testing Strategy

This pull request was tested by compiling, running a normal app on Imix, and by panicing intentionally and observing the output looks normal.

TODO or Help Wanted

Confirmation that I am correct in my understanding that we do not need eh_personality because we always use panic=abort.

Documentation Updated

  • No updates are required.

Formatting

  • Ran make prepush.

@mcy mcy mentioned this pull request Jun 17, 2020
29 tasks
Copy link
Member

@ppannuto ppannuto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

This is great. If I understand correctly, if folks try to use a different panic mechanism, they'll get a missing symbol error for eh_personality now, which frankly is probably a good thing, as there are likely other expectations not met by our old empty function.

@bors bors bot merged commit 9fb0384 into tock:master Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants