-
Couldn't load subscription status.
- Fork 13.9k
target tier policy compliance #116004
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
target tier policy compliance #116004
Conversation
Update target tier policy to require that targets be able to produce object code with a supported backend. Signed-off-by: David Wood <david@davidtw.co>
Signed-off-by: David Wood <david@davidtw.co>
Signed-off-by: David Wood <david@davidtw.co>
Signed-off-by: David Wood <david@davidtw.co>
Signed-off-by: David Wood <david@davidtw.co>
Signed-off-by: David Wood <david@davidtw.co>
Signed-off-by: David Wood <david@davidtw.co>
Signed-off-by: David Wood <david@davidtw.co>
Signed-off-by: David Wood <david@davidtw.co>
Signed-off-by: David Wood <david@davidtw.co>
Signed-off-by: David Wood <david@davidtw.co>
Signed-off-by: David Wood <david@davidtw.co>
Signed-off-by: David Wood <david@davidtw.co>
Signed-off-by: David Wood <david@davidtw.co>
Signed-off-by: David Wood <david@davidtw.co>
Signed-off-by: David Wood <david@davidtw.co>
Signed-off-by: David Wood <david@davidtw.co>
Signed-off-by: David Wood <david@davidtw.co>
Signed-off-by: David Wood <david@davidtw.co>
Signed-off-by: David Wood <david@davidtw.co>
Signed-off-by: David Wood <david@davidtw.co>
Signed-off-by: David Wood <david@davidtw.co>
Signed-off-by: David Wood <david@davidtw.co>
Signed-off-by: David Wood <david@davidtw.co>
Signed-off-by: David Wood <david@davidtw.co>
Signed-off-by: David Wood <david@davidtw.co>
Signed-off-by: David Wood <david@davidtw.co>
Signed-off-by: David Wood <david@davidtw.co>
Signed-off-by: David Wood <david@davidtw.co>
Signed-off-by: David Wood <david@davidtw.co>
|
@davidtwco |
| @@ -0,0 +1,17 @@ | |||
| // assembly-output: emit-asm | |||
| // compile-flags: --target aarch64_be-unknown-netbsd | |||
| // needs-llvm-components: aarch64 | |||
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.
How identical are these tests? Does the assembly test suite support revisions? Would it be worth having a single test with a revision for each target, instead of tons of files?
|
☔ The latest upstream changes (presumably #115230) made this pull request unmergeable. Please resolve the merge conflicts. |
| @@ -0,0 +1,17 @@ | |||
| // assembly-output: emit-asm | |||
| // compile-flags: --target s390x-unknown-linux-gnu | |||
| // needs-llvm-components: s390x | |||
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 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.
Yep, that's what the component is named in LLVM.
|
I'm a little concerned about the proliferation of over 200 new chapters in the rustc book. It can overwhelm the navigation, and generally a be a bit too much. Would it be possible to consider the following changes to mitigate that?
[output.html.fold]
enable = true
level = 1 |
| **Tier: 2** | ||
|
|
||
| | Target | Tier | Description | | ||
| | ============================== | ====================== | =============================================== | |
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.
All of these tables do not render correctly. I believe the header separator must use ----, not ====.
|
There will also be a lot of redundancy across these target pages, e.g. once we start documenting things that are wrong with particular targets (such as #113053). However, for those kinds of problems, grouping the pages by OS wouldn't be helpful -- we'd want them grouped by architecture. |
|
Is it really necessary to list every triple in platform-support document? Triple consists of |
Uh-oh. I care about this. It's evident that I need to get off my butt and upstream the
Ditto, I'll take a look. "No longer existed" for |
| // assembly-output: emit-asm | ||
| // compile-flags: --target asmjs-unknown-emscripten | ||
| // needs-llvm-components: webassembly | ||
|
|
||
| #![feature(no_core, lang_items)] | ||
| #![no_std] | ||
| #![no_core] | ||
| #![crate_type = "lib"] | ||
|
|
||
| #[lang = "sized"] | ||
| trait Sized {} | ||
|
|
||
| pub fn test() -> u8 { | ||
| 42 | ||
| } | ||
|
|
||
| // CHECK: .section |
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.
Being able to write an assembly test here does not mean that this target generates the correct code: the object code this target currently generates is instead wasm, which allows it to pass the "does it generate assembly" question, but will not actually be asm.js (and makes the target redundant with wasm32-unknown-emscripten).
|
In addition to specific targets, it may be useful to have maintainers for specific architectures for issues like #117347. Really, maybe our target maintainership should be a bit more two-dimensional? Maintainers for arches and maintainers for OS/platform. This would significantly reduce the amount of necessary files and would be more useful in practice I think. There are of course exceptions like consoles that are very "single target" focused, but for something like |
|
I have taken steps to retain the |
It would also be great to have an easier way to ping them. Right now it is quite cumbersome. We could maybe utilize ping groups for that? |
|
I got busy and let this bitrot a little too much, so I'm going to close this PR and take a different approach taking into account a lot of the feedback here. If you sent me information about your targets then I've kept track of that and will make use of it. If you have more feedback on this then feel free to continue to comment here or message me on Zulip. |
…=petrochenkov target: move base and target specifications Follow-up to rust-lang#116004. In anticipation of later PRs where we'll want to add tidy checks to ensure that, for each target, we have a test or a platform support document or something like that, this PR moves target specifications into a directory on their own so that we can just list the files in this directory to get a list of all targets. - Base specifications are moved to `rustc_target::spec::base`. - Target specifications are moved to `rustc_target::spec::targets`. - All the other source files containing types used in the target specs remain in `rustc_target::spec`. - `rustc_target/src/spec/abi.rs` is moved to `rustc_target/src/spec/abi/mod.rs` (where there was already a `tests.rs`) for uniformity. r? `@petrochenkov`
…=petrochenkov target: move base and target specifications Follow-up to rust-lang#116004. In anticipation of later PRs where we'll want to add tidy checks to ensure that, for each target, we have a test or a platform support document or something like that, this PR moves target specifications into a directory on their own so that we can just list the files in this directory to get a list of all targets. - Base specifications are moved to `rustc_target::spec::base`. - Target specifications are moved to `rustc_target::spec::targets`. - All the other source files containing types used in the target specs remain in `rustc_target::spec`. - `rustc_target/src/spec/abi.rs` is moved to `rustc_target/src/spec/abi/mod.rs` (where there was already a `tests.rs`) for uniformity. r? ``@petrochenkov``
Rollup merge of rust-lang#117702 - davidtwco:target-tier-refactors, r=petrochenkov target: move base and target specifications Follow-up to rust-lang#116004. In anticipation of later PRs where we'll want to add tidy checks to ensure that, for each target, we have a test or a platform support document or something like that, this PR moves target specifications into a directory on their own so that we can just list the files in this directory to get a list of all targets. - Base specifications are moved to `rustc_target::spec::base`. - Target specifications are moved to `rustc_target::spec::targets`. - All the other source files containing types used in the target specs remain in `rustc_target::spec`. - `rustc_target/src/spec/abi.rs` is moved to `rustc_target/src/spec/abi/mod.rs` (where there was already a `tests.rs`) for uniformity. r? ``@petrochenkov``
Fixes #113739
This pull request makes a lot of changes to our targets (nothing that affects their behaviour!) to start making sure that they all comply with our target tier policy.
tests/assembly/targets, it's the same simple code in each test, it just confirms that we can in fact produce something resembling assembly given the target triple.compiler/rustc_target/spec. Previously, we had the base targets (e.g.windows_msvc_base, which all the Windows MSVC targets would inherit from) in the same directory as the targets themselves. I've moved these tocompiler/rustc_target/spec/base. This change makes the implementation of a new tidy lint easier.windows_msvc.mdwhich would be linked to by all of the Windows MSVC targets. I've changed it so that every target has its own page, and when multiple targets were linking to one page, then only one of those targets has the content of that previous page, and the others symlink to that target. Likewise, this change makes the implementation of a new tidy lint easier.compiler/rustc_target/spec, there exists a test with the same filename intests/assembly/targetand platform support documentation insrc/doc/rustc/src/platform-support/. After all of my changes, this tidy lint isn't reporting any errors.With respect to specific targets:
i386-unknown-linux-gnuandi486-unknown-linux-gnu. Originally added in Added support for i386-unknown-linux-gnu and i486-unknown-linux-gnu #80662, these targets never actually got added to the compiler, the target definitions were there but the compiler never knew about them.amd64tox86_64andmipselremoved) - I’ve updated it to reflect the targets which exist.i686-pc-windows-msvcandx86_64-pc-windows-msvcwere listed as both tier 1 and tier 3, depending on the version of Windows, which seems like a misuse of the tier system, so I've removed them from tier 3. Support for different versions of the target can be documented in the platform support page.powerpc-unknown-openbsdwasn't listed in OpenBSD's platform support page like every other OpenBSD target - I've added it but maybe I shouldn't have.Tier 1 w/ Host Tools
aarch64-unknown-linux-gnui686-pc-windows-gnui686-pc-windows-msvci686-unknown-linux-gnux86_64-apple-darwinx86_64-pc-windows-gnux86_64-pc-windows-msvcx86_64-unknown-linux-gnuTier 2 w/ Host Tools
aarch64-apple-darwinaarch64-pc-windows-msvcaarch64-unknown-linux-muslarm-unknown-linux-gnueabiarm-unknown-linux-gnueabihfarmv7-unknown-linux-gnueabihfloongarch64-unknown-linux-gnumips-unknown-linux-gnumips64-unknown-linux-gnuabi64mips64el-unknown-linux-gnuabi64mipsel-unknown-linux-gnupowerpc-unknown-linux-gnupowerpc64-unknown-linux-gnupowerpc64le-unknown-linux-gnuriscv64gc-unknown-linux-gnus390x-unknown-linux-gnux86_64-unknown-freebsdx86_64-unknown-illumosx86_64-unknown-linux-muslx86_64-unknown-netbsdamd64->x86_64andmipselremoved) - I've updated it to reflect the targets which existTier 2
aarch64-apple-iosaarch64-apple-ios-simaarch64-fuchsiaaarch64-unknown-fuchsiaaarch64-linux-androidaarch64-unknown-none-softfloataarch64-unknown-noneaarch64-unknown-uefiarm-linux-androideabiarm-unknown-linux-musleabiarm-unknown-linux-musleabihfarmebv7r-none-eabiarmebv7r-none-eabihfarmv5te-unknown-linux-gnueabiarmv5te-unknown-linux-musleabiarmv7-linux-androideabiarmv7-unknown-linux-gnueabiarmv7-unknown-linux-musleabiarmv7-unknown-linux-musleabihfarmv7a-none-eabiarmv7r-none-eabiarmv7r-none-eabihfasmjs-unknown-emscriptenasmjs-unknown-emscriptento push a boulder up a hill for eternity compiler-team#668i586-pc-windows-msvci586-unknown-linux-gnui586-unknown-linux-musli686-linux-androidi686-unknown-freebsdi686-unknown-linux-musli686-unknown-uefimips-unknown-linux-muslmips64-unknown-linux-muslabi64mips64el-unknown-linux-muslabi64mipsel-unknown-linux-muslnvptx64-nvidia-cudariscv32i-unknown-none-elfriscv32imac-unknown-none-elfriscv32imc-unknown-none-elfriscv64gc-unknown-none-elfriscv64imac-unknown-none-elfsparc64-unknown-linux-gnusparcv9-sun-solaristhumbv6m-none-eabithumbv7em-none-eabithumbv7em-none-eabihfthumbv7m-none-eabithumbv7neon-linux-androideabithumbv7neon-unknown-linux-gnueabihfthumbv8m.base-none-eabithumbv8m.main-none-eabithumbv8m.main-none-eabihfwasm32-unknown-emscriptenwasm32-unknown-unknownwasm32-wasiwasm32-wasi-preview1-threadsx86_64-apple-iosx86_64-fortanix-unknown-sgxx86_64-fuchsiax86_64-unknown-fuchsiax86_64-linux-androidx86_64-pc-solarisx86_64-unknown-linux-gnux32x86_64-unknown-nonex86_64-unknown-redoxx86_64-unknown-uefiTier 3
aarch64-apple-ios-macabiaarch64-apple-tvosaarch64-apple-watchos-simaarch64-kmc-solid_asp3aarch64-nintendo-switch-freestandingaarch64-pc-windows-gnullvmaarch64-unknown-linux-ohosaarch64-unknown-teeosaarch64-unknown-nto-qnx710aarch64-unknown-freebsdaarch64-unknown-hermitaarch64-unknown-linux-gnu_ilp32aarch64-unknown-netbsdaarch64-unknown-openbsdaarch64-unknown-redoxaarch64-uwp-windows-msvcaarch64-wrs-vxworksaarch64_be-unknown-linux-gnu_ilp32aarch64_be-unknown-linux-gnuaarch64_be-unknown-netbsdarm64_32-apple-watchosaarch64_32-apple-watchos?armeb-unknown-linux-gnueabiarmv4t-none-eabiarmv4t-unknown-linux-gnueabiarmv5te-none-eabiarmv5te-unknown-linux-uclibceabiarmv6-unknown-freebsdarmv6-unknown-netbsd-eabihfarmv6k-nintendo-3dsarmv7-apple-iosarmv7-sony-vita-newlibeabihfarmv7-unknown-linux-ohosarmv7-unknown-linux-uclibceabiarmv7-unknown-linux-uclibceabihfarmv7-unknown-freebsdarmv7-unknown-netbsd-eabihfarmv7-wrs-vxworks-eabihfarmv7a-kmc-solid_asp3-eabiarmv7a-kmc-solid_asp3-eabihfarmv7a-none-eabihfarmv7k-apple-watchosarmv7s-apple-iosavr-unknown-gnu-atmega328bpfeb-unknown-nonebpfel-unknown-nonecsky-unknown-linux-gnuabiv2hexagon-unknown-linux-musli386-apple-iosi586-pc-nto-qnx700i686-apple-darwini686-pc-windows-msvci686-pc-windows-gnullvmi686-unknown-haikui686-unknown-netbsdi686-unknown-openbsdi686-uwp-windows-gnui686-uwp-windows-msvci686-wrs-vxworksloongarch64-unknown-noneloongarch64-unknown-none-softfloatm68k-unknown-linux-gnumips-unknown-linux-uclibcmips64-openwrt-linux-muslmipsel-sony-pspmipsel-sony-psxmipsel-unknown-linux-uclibcmipsel-unknown-nonemipsisa32r6-unknown-linux-gnumipsisa32r6el-unknown-linux-gnumipsisa64r6-unknown-linux-gnuabi64mipsisa64r6el-unknown-linux-gnuabi64msp430-none-elfpowerpc-unknown-linux-gnuspepowerpc-unknown-linux-muslpowerpc-unknown-netbsdpowerpc-unknown-openbsdpowerpc-wrs-vxworks-spepowerpc-wrs-vxworkspowerpc64-unknown-freebsdpowerpc64le-unknown-freebsdpowerpc-unknown-freebsdpowerpc64-unknown-linux-muslpowerpc64-wrs-vxworkspowerpc64le-unknown-linux-muslpowerpc64-unknown-openbsdpowerpc64-ibm-aixriscv32gc-unknown-linux-gnuriscv32gc-unknown-linux-muslriscv32im-unknown-none-elfriscv32imac-unknown-xous-elfriscv32imc-esp-espidfriscv32imac-esp-espidfriscv64gc-unknown-hermitriscv64gc-unknown-freebsdriscv64gc-unknown-fuchsiariscv64gc-unknown-linux-muslriscv64gc-unknown-netbsdriscv64gc-unknown-openbsdriscv64-linux-androids390x-unknown-linux-muslsparc-unknown-linux-gnusparc-unknown-none-elfsparc64-unknown-netbsdsparc64-unknown-openbsdthumbv4t-none-eabithumbv5te-none-eabithumbv7a-pc-windows-msvcthumbv7a-uwp-windows-msvcthumbv7neon-unknown-linux-musleabihfwasm64-unknown-unknownx86_64-apple-ios-macabix86_64-apple-tvosx86_64-apple-watchos-simx86_64-pc-nto-qnx710x86_64-pc-windows-gnullvmx86_64-pc-windows-msvcx86_64-sun-solarisx86_64-unikraft-linux-muslx86_64-unknown-dragonflyx86_64-unknown-haikux86_64-unknown-hermitx86_64-unknown-l4re-uclibcx86_64-unknown-linux-ohosx86_64-unknown-openbsdx86_64-uwp-windows-gnux86_64-uwp-windows-msvcx86_64-wrs-vxworksx86_64h-apple-darwinI intend to go through each of these to try and fix them, but I encourage all contributions helping out!
cc rust-lang/rust-forge#255
r? @wesleywiser