-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 managarm as a tier 3 target #123319
base: master
Are you sure you want to change the base?
Add managarm as a tier 3 target #123319
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @davidtwco (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
These commits modify compiler targets. Some changes occurred in src/doc/rustc/src/platform-support cc @Nilstrieb Some changes occurred in tests/ui/check-cfg cc @Urgau |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Matt Taylor <mstaveleytaylor@gmail.com> Co-authored-by: Dennis Bonke <dennis@managarm.org>
compiler/rustc_target/src/spec/targets/x86_64_unknown_managarm_mlibc.rs
Outdated
Show resolved
Hide resolved
|
||
## Building Rust programs | ||
|
||
Build a `x86_64-managarm-gcc` using our [gcc fork](https://github.com/managarm/gcc). |
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.
Does lld not work for this target?
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.
Using lld
is not a supported and tested option for us right now.
Addressed the comments with the fixup commits. |
|
||
## Building the target | ||
|
||
For now, building a patched LLVM with [our patches located here](https://github.com/managarm/bootstrap-managarm/tree/master/patches/llvm) is necessary. |
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.
@wesleywiser do we have any other targets which need a patched LLVM? I think we might want this to wait for support to exist in LLVM?
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.
I don't think any other targets currently need a patched LLVM to build (of course, newer LLVMs might work better). If I remember correctly, the loongarch targets waited until we had updated to a version of LLVM with sufficient support to link libcore
before being merged.
@no92 is there urgency to land this PR now or can we wait until an LLVM release picks up support for managarm?
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.
There's no urgency, so we're happy to merge our changes into LLVM first if that makes more sense.
But it would be nice if we could get this merged fairly soon after our changes hit LLVM master, because it blocks us upstreaming our changes to other Rust crates, and that's the bulk of the maintenance effort on our end: supporting locally patched crates (and sometimes multiple versions thereof!) has proved quite tricky to manage
Anyway, we'll check back once our LLVM changes are merged and see how people feel :)
☔ The latest upstream changes (presumably #123517) made this pull request unmergeable. Please resolve the merge conflicts. |
Marking this as blocked on LLVM support for the target |
This PR aims to introduce the
x86_64-unknown-managarm-mlibc
as a tier 3 target to Rust.managarm is a microkernel with fully asynchronous I/O that also provides a POSIX server. Despite the differences, managarm provides good compatability with POSIX and Linux APIs. As a rule of thumb, barring OS-specific code, it should be mostly source-compatible with Linux.
We have been shipping a patched rust for over 25 releases now, and we would like to upstream our work. For a smoother process, this PR only adds the target to rustc and some documentation.
std
support will be added in a future PR.Addressing the tier 3 target policy
@no92, @64 and @Dennisbonke will be target maintainers.
x86_64-unknown-managarm-mlibc
is what we use for LLVM as well.managarm is licensed as MIT. No dependencies were added.
Understood. None of the listed maintainers are on a Rust team.
Support for
std
will be provided in a future PR. Only minor changes are required, however they depend on support in thelibc
crate which will be PRed in soon.The steps needed to take are described in the documentation provided with this PR.
Understood.
We have no indication that anything breaks due to this PR.
No problems here, as we target
x86_64
.r? compiler-team