-
Notifications
You must be signed in to change notification settings - Fork 70
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 uefi
os constraint
#97
Conversation
Please take a look at this. Thanks. |
The typical standard we use for PRs like this is "how many projects need the same OS constraint?" (the alternate solution is "projects define their own custom OS constraint"). What are the downsides? Are there cases where projects are trying to build code with multiple language rules for the same |
I am currently working on one such project (a type 1 hypervisor). We defined The issue arises when compiling rust code using our local
Tracing through this, we get to this line in
It's clear that rules_rust expects the os constraint to be included upstream. There's a PR already approved by the maintainers (bazelbuild/rules_rust#2142). The alternative would be declaring a project-local os constraint. (rules_rust used to have them, but support for them was removed two years ago.) When it comes to other projects, I believe that @monogon-dev also needs this for rules_rust and rules_go. (@lorenz from monogon-dev opened the rules_rust PR.) |
Thanks for clarifying, I agree that this is a valid use case. rules_rust should be capable of handling constraints that aren't in |
A duplicate of #76, since that PR seems to be abandoned after almost a year of no updates from the original author.
This PR creates a
uefi
OS constraint. UEFI is a firmware environment with clear parallels to a conventional OS:main
main
efi_main
dlsym
GetProcAddress
SystemTable->BootServices->LocateProtocol
There are compilers that treat UEFI as an OS:
*-unknown-uefi
targets.subsystem:efi_application
.)This is also blocking at least one project downstream. (bazelbuild/rules_rust#2142)
This closes #98