-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
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 <[email protected]>
Signed-off-by: David Wood <[email protected]>
Signed-off-by: David Wood <[email protected]>
Signed-off-by: David Wood <[email protected]>
Signed-off-by: David Wood <[email protected]>
Signed-off-by: David Wood <[email protected]>
Signed-off-by: David Wood <[email protected]>
Signed-off-by: David Wood <[email protected]>
Signed-off-by: David Wood <[email protected]>
Signed-off-by: David Wood <[email protected]>
Signed-off-by: David Wood <[email protected]>
Signed-off-by: David Wood <[email protected]>
Signed-off-by: David Wood <[email protected]>
Signed-off-by: David Wood <[email protected]>
Signed-off-by: David Wood <[email protected]>
Signed-off-by: David Wood <[email protected]>
Signed-off-by: David Wood <[email protected]>
Signed-off-by: David Wood <[email protected]>
Signed-off-by: David Wood <[email protected]>
Signed-off-by: David Wood <[email protected]>
Signed-off-by: David Wood <[email protected]>
Signed-off-by: David Wood <[email protected]>
Signed-off-by: David Wood <[email protected]>
Signed-off-by: David Wood <[email protected]>
Signed-off-by: David Wood <[email protected]>
Signed-off-by: David Wood <[email protected]>
Signed-off-by: David Wood <[email protected]>
Signed-off-by: David Wood <[email protected]>
Signed-off-by: David Wood <[email protected]>
Signed-off-by: David Wood <[email protected]>
That matches my understanding as well.
That's correct and dotnet is also dropping support for thumbv7a/arm32 Windows in the next major version. |
@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.md
which 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/target
and 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-gnu
andi486-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.amd64
tox86_64
andmipsel
removed) - I’ve updated it to reflect the targets which exist.i686-pc-windows-msvc
andx86_64-pc-windows-msvc
were 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-openbsd
wasn'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-gnu
i686-pc-windows-gnu
i686-pc-windows-msvc
i686-unknown-linux-gnu
x86_64-apple-darwin
x86_64-pc-windows-gnu
x86_64-pc-windows-msvc
x86_64-unknown-linux-gnu
Tier 2 w/ Host Tools
aarch64-apple-darwin
aarch64-pc-windows-msvc
aarch64-unknown-linux-musl
arm-unknown-linux-gnueabi
arm-unknown-linux-gnueabihf
armv7-unknown-linux-gnueabihf
loongarch64-unknown-linux-gnu
mips-unknown-linux-gnu
mips64-unknown-linux-gnuabi64
mips64el-unknown-linux-gnuabi64
mipsel-unknown-linux-gnu
powerpc-unknown-linux-gnu
powerpc64-unknown-linux-gnu
powerpc64le-unknown-linux-gnu
riscv64gc-unknown-linux-gnu
s390x-unknown-linux-gnu
x86_64-unknown-freebsd
x86_64-unknown-illumos
x86_64-unknown-linux-musl
x86_64-unknown-netbsd
amd64
->x86_64
andmipsel
removed) - I've updated it to reflect the targets which existTier 2
aarch64-apple-ios
aarch64-apple-ios-sim
aarch64-fuchsia
aarch64-unknown-fuchsia
aarch64-linux-android
aarch64-unknown-none-softfloat
aarch64-unknown-none
aarch64-unknown-uefi
arm-linux-androideabi
arm-unknown-linux-musleabi
arm-unknown-linux-musleabihf
armebv7r-none-eabi
armebv7r-none-eabihf
armv5te-unknown-linux-gnueabi
armv5te-unknown-linux-musleabi
armv7-linux-androideabi
armv7-unknown-linux-gnueabi
armv7-unknown-linux-musleabi
armv7-unknown-linux-musleabihf
armv7a-none-eabi
armv7r-none-eabi
armv7r-none-eabihf
asmjs-unknown-emscripten
asmjs-unknown-emscripten
to push a boulder up a hill for eternity compiler-team#668i586-pc-windows-msvc
i586-unknown-linux-gnu
i586-unknown-linux-musl
i686-linux-android
i686-unknown-freebsd
i686-unknown-linux-musl
i686-unknown-uefi
mips-unknown-linux-musl
mips64-unknown-linux-muslabi64
mips64el-unknown-linux-muslabi64
mipsel-unknown-linux-musl
nvptx64-nvidia-cuda
riscv32i-unknown-none-elf
riscv32imac-unknown-none-elf
riscv32imc-unknown-none-elf
riscv64gc-unknown-none-elf
riscv64imac-unknown-none-elf
sparc64-unknown-linux-gnu
sparcv9-sun-solaris
thumbv6m-none-eabi
thumbv7em-none-eabi
thumbv7em-none-eabihf
thumbv7m-none-eabi
thumbv7neon-linux-androideabi
thumbv7neon-unknown-linux-gnueabihf
thumbv8m.base-none-eabi
thumbv8m.main-none-eabi
thumbv8m.main-none-eabihf
wasm32-unknown-emscripten
wasm32-unknown-unknown
wasm32-wasi
wasm32-wasi-preview1-threads
x86_64-apple-ios
x86_64-fortanix-unknown-sgx
x86_64-fuchsia
x86_64-unknown-fuchsia
x86_64-linux-android
x86_64-pc-solaris
x86_64-unknown-linux-gnux32
x86_64-unknown-none
x86_64-unknown-redox
x86_64-unknown-uefi
Tier 3
aarch64-apple-ios-macabi
aarch64-apple-tvos
aarch64-apple-watchos-sim
aarch64-kmc-solid_asp3
aarch64-nintendo-switch-freestanding
aarch64-pc-windows-gnullvm
aarch64-unknown-linux-ohos
aarch64-unknown-teeos
aarch64-unknown-nto-qnx710
aarch64-unknown-freebsd
aarch64-unknown-hermit
aarch64-unknown-linux-gnu_ilp32
aarch64-unknown-netbsd
aarch64-unknown-openbsd
aarch64-unknown-redox
aarch64-uwp-windows-msvc
aarch64-wrs-vxworks
aarch64_be-unknown-linux-gnu_ilp32
aarch64_be-unknown-linux-gnu
aarch64_be-unknown-netbsd
arm64_32-apple-watchos
aarch64_32-apple-watchos
?armeb-unknown-linux-gnueabi
armv4t-none-eabi
armv4t-unknown-linux-gnueabi
armv5te-none-eabi
armv5te-unknown-linux-uclibceabi
armv6-unknown-freebsd
armv6-unknown-netbsd-eabihf
armv6k-nintendo-3ds
armv7-apple-ios
armv7-sony-vita-newlibeabihf
armv7-unknown-linux-ohos
armv7-unknown-linux-uclibceabi
armv7-unknown-linux-uclibceabihf
armv7-unknown-freebsd
armv7-unknown-netbsd-eabihf
armv7-wrs-vxworks-eabihf
armv7a-kmc-solid_asp3-eabi
armv7a-kmc-solid_asp3-eabihf
armv7a-none-eabihf
armv7k-apple-watchos
armv7s-apple-ios
avr-unknown-gnu-atmega328
bpfeb-unknown-none
bpfel-unknown-none
csky-unknown-linux-gnuabiv2
hexagon-unknown-linux-musl
i386-apple-ios
i586-pc-nto-qnx700
i686-apple-darwin
i686-pc-windows-msvc
i686-pc-windows-gnullvm
i686-unknown-haiku
i686-unknown-netbsd
i686-unknown-openbsd
i686-uwp-windows-gnu
i686-uwp-windows-msvc
i686-wrs-vxworks
loongarch64-unknown-none
loongarch64-unknown-none-softfloat
m68k-unknown-linux-gnu
mips-unknown-linux-uclibc
mips64-openwrt-linux-musl
mipsel-sony-psp
mipsel-sony-psx
mipsel-unknown-linux-uclibc
mipsel-unknown-none
mipsisa32r6-unknown-linux-gnu
mipsisa32r6el-unknown-linux-gnu
mipsisa64r6-unknown-linux-gnuabi64
mipsisa64r6el-unknown-linux-gnuabi64
msp430-none-elf
powerpc-unknown-linux-gnuspe
powerpc-unknown-linux-musl
powerpc-unknown-netbsd
powerpc-unknown-openbsd
powerpc-wrs-vxworks-spe
powerpc-wrs-vxworks
powerpc64-unknown-freebsd
powerpc64le-unknown-freebsd
powerpc-unknown-freebsd
powerpc64-unknown-linux-musl
powerpc64-wrs-vxworks
powerpc64le-unknown-linux-musl
powerpc64-unknown-openbsd
powerpc64-ibm-aix
riscv32gc-unknown-linux-gnu
riscv32gc-unknown-linux-musl
riscv32im-unknown-none-elf
riscv32imac-unknown-xous-elf
riscv32imc-esp-espidf
riscv32imac-esp-espidf
riscv64gc-unknown-hermit
riscv64gc-unknown-freebsd
riscv64gc-unknown-fuchsia
riscv64gc-unknown-linux-musl
riscv64gc-unknown-netbsd
riscv64gc-unknown-openbsd
riscv64-linux-android
s390x-unknown-linux-musl
sparc-unknown-linux-gnu
sparc-unknown-none-elf
sparc64-unknown-netbsd
sparc64-unknown-openbsd
thumbv4t-none-eabi
thumbv5te-none-eabi
thumbv7a-pc-windows-msvc
thumbv7a-uwp-windows-msvc
thumbv7neon-unknown-linux-musleabihf
wasm64-unknown-unknown
x86_64-apple-ios-macabi
x86_64-apple-tvos
x86_64-apple-watchos-sim
x86_64-pc-nto-qnx710
x86_64-pc-windows-gnullvm
x86_64-pc-windows-msvc
x86_64-sun-solaris
x86_64-unikraft-linux-musl
x86_64-unknown-dragonfly
x86_64-unknown-haiku
x86_64-unknown-hermit
x86_64-unknown-l4re-uclibc
x86_64-unknown-linux-ohos
x86_64-unknown-openbsd
x86_64-uwp-windows-gnu
x86_64-uwp-windows-msvc
x86_64-wrs-vxworks
x86_64h-apple-darwin
I 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