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

Add miri_start support #3769

Merged
merged 2 commits into from
Aug 2, 2024
Merged

Add miri_start support #3769

merged 2 commits into from
Aug 2, 2024

Conversation

primoly
Copy link
Contributor

@primoly primoly commented Jul 28, 2024

This PR uses a function with the exported symbol miri_start as a drop-in alternative to #[start]. So the signature stays the same as suggested in this comment. I’ve also removed Miri’s restriction to only work on bin crates as I don’t think this is necessary anymore.

Closes #3758

src/bin/miri.rs Outdated Show resolved Hide resolved
src/bin/miri.rs Outdated Show resolved Hide resolved
Copy link
Member

@RalfJung RalfJung left a comment

Choose a reason for hiding this comment

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

This is very nice, thanks. :) I just have some minor comments.

src/bin/miri.rs Outdated Show resolved Hide resolved
tests/fail/no_main.rs Outdated Show resolved Hide resolved
src/bin/miri.rs Outdated Show resolved Hide resolved
src/bin/miri.rs Outdated Show resolved Hide resolved
src/bin/miri.rs Outdated Show resolved Hide resolved
@RalfJung
Copy link
Member

RalfJung commented Aug 2, 2024

Please also squash this into a single commit. :)

@RalfJung
Copy link
Member

RalfJung commented Aug 2, 2024

Thanks. :)

@bors r+

@bors
Copy link
Contributor

bors commented Aug 2, 2024

📌 Commit e290a9e has been approved by RalfJung

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Aug 2, 2024

⌛ Testing commit e290a9e with merge 4b649eb...

@bors
Copy link
Contributor

bors commented Aug 2, 2024

☀️ Test successful - checks-actions
Approved by: RalfJung
Pushing 4b649eb to master...

@bors bors merged commit 4b649eb into rust-lang:master Aug 2, 2024
8 checks passed
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.

Support miri-specific entry point / start function for no-std binaries
4 participants