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

uefi: Fix compilation of minimal example #1353

Merged
merged 1 commit into from
Aug 25, 2024

Conversation

nicholasbishop
Copy link
Member

This turns out to be easier than I expected: just add extern crate std; so that the panic handler and global allocator are set. The line is hidden so that it doesn't appear in the rendered docs.

This allows the code block to no_run instead of ignore, so it will be compiled (but not run, so there's no main linker error), and that also has the nice side effect of removing the orange ! warning bubble in the rendered docs.

Checklist

  • Sensible git history (for example, squash "typo" or "fix" commits). See the Rewriting History guide for help.
  • Update the changelog (if necessary)

This turns out to be easier than I expected: just add `extern crate std;` so
that the panic handler and global allocator are set. The line is hidden so that
it doesn't appear in the rendered docs.

This allows the code block to `no_run` instead of `ignore`, so it will be
compiled (but not run, so there's no `main` linker error), and that also has the
nice side effect of removing the orange `!` warning bubble in the rendered docs.
@phip1611 phip1611 enabled auto-merge August 25, 2024 16:34
@phip1611 phip1611 added this pull request to the merge queue Aug 25, 2024
Merged via the queue into rust-osdev:main with commit 7bd40b9 Aug 25, 2024
15 checks passed
@nicholasbishop nicholasbishop deleted the bishop-example-compile branch August 25, 2024 16:45
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.

2 participants