-
-
Notifications
You must be signed in to change notification settings - Fork 15.6k
Add OpenBSD -current release version to target_env
#160739
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,6 +19,21 @@ The target names follow this format: `$ARCH-unknown-openbsd`, where `$ARCH` spec | |
|
|
||
| Note that all OS versions are *major* even if using X.Y notation (`6.8` and `6.9` are different major versions) and could be binary incompatibles (with breaking changes). | ||
|
|
||
| > [!IMPORTANT] | ||
| > These targets, if supported by the next OpenBSD `-current` release | ||
| > channel, need to update the `rustc_target::spec::Env` type under | ||
| > `compiler/` in the `rust-lang/rust` repository whenever a new OpenBSD | ||
| > version is released. If unsupported, the prior `Env` data constructor | ||
| > shall need to remain, while a new data constructor for the new release | ||
| > upstream shall be created for all targets that are still supported | ||
| > upstream. | ||
| > | ||
| > That should reflect the `-current` release channel, which is always | ||
| > one version above the latest `-release` channel version. | ||
| > | ||
| > One must also update the `src/librustdoc/clean.rs` file with the | ||
| > relevant formatted string providing a public view of this | ||
| > `target_env` value. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This can be a markdown comment, as it's relevant to the people updating the doc rather than people reading it. Just make it a numbered todo list to keep things simple, and you can probably say "note that if OpenBSD stops supporting a platform we may want to freeze its Also "data constructors" is kind of an unusual term, they're just enum variants. |
||
|
|
||
| ## Target Maintainers | ||
|
|
||
|
|
@@ -30,7 +45,6 @@ Further contacts: | |
|
|
||
| Fallback to ports@openbsd.org, OpenBSD third parties public mailing-list (with openbsd developers readers) | ||
|
|
||
|
|
||
| ## Requirements | ||
|
|
||
| These targets are natively compiled and could be cross-compiled. | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -156,7 +156,7 @@ warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` | |||||||||||||||||||||||||||||||||||||||
| LL | target_env = "_UNEXPECTED_VALUE", | ||||||||||||||||||||||||||||||||||||||||
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||||||||||||||||||||||||||||||||||||||||
| | | ||||||||||||||||||||||||||||||||||||||||
| = note: expected values for `target_env` are: ``, `gnu`, `macabi`, `mlibc`, `msvc`, `musl`, `newlib`, `nto70`, `nto71`, `nto71_iosock`, `ohos`, `p1`, `p2`, `p3`, `relibc`, `sgx`, `sim`, `uclibc`, and `v5` | ||||||||||||||||||||||||||||||||||||||||
| = note: expected values for `target_env` are: ``, `gnu`, `macabi`, `mlibc`, `msvc`, `musl`, `newlib`, `nto70`, `nto71`, `nto71_iosock`, `ohos`, `openbsd7.9`, `p1`, `p2`, `p3`, `relibc`, `sgx`, `sim`, `uclibc`, and `v5` | ||||||||||||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We may want to allow any If that's easy then I think you could do it here but if not, can be a followup.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm looking into this.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I have some basics done to accomplish this. The current In I've tried to go for something simple (that doesn't yet build.) The The two prior variants covered the possibility for (1) some This bound is currently limitted to all values above some known value, Then back in the I've yet to look into how do the set of expected values get parsed in
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change is not feasible. It possibly needs an RFC prior to Working around it only for OpenBSD while using the I think the need we have in this instance could be fulfilled once the Footnotes
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think there's anything in RFC territory or changes to the parser needed, just an update to also check a (for now) hardcoded predicate for OpenBSD at rust/compiler/rustc_attr_parsing/src/attributes/cfg.rs Lines 206 to 224 in f0bbd8d
|
||||||||||||||||||||||||||||||||||||||||
| = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.
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.
Though the contents of this block are more relevant for rustc developers (and should move to a comment as noted), please do add user-facing documentation about what version is supported (
-current) and howtarget_envworksView changes since the review