diff --git a/compiler/rustc_target/src/spec/base/helenos.rs b/compiler/rustc_target/src/spec/base/helenos.rs new file mode 100644 index 0000000000000..8d6f406e41f73 --- /dev/null +++ b/compiler/rustc_target/src/spec/base/helenos.rs @@ -0,0 +1,17 @@ +use crate::spec::{PanicStrategy, RelroLevel, StackProbeType, TargetOptions}; + +pub(crate) fn opts() -> TargetOptions { + TargetOptions { + os: "helenos".into(), + + dynamic_linking: true, + // we need the linker to keep libgcc and friends + no_default_libraries: false, + has_rpath: true, + relro_level: RelroLevel::Full, + panic_strategy: PanicStrategy::Abort, + stack_probes: StackProbeType::Inline, + + ..Default::default() + } +} diff --git a/compiler/rustc_target/src/spec/base/mod.rs b/compiler/rustc_target/src/spec/base/mod.rs index b368d93f00726..741461c28c0a0 100644 --- a/compiler/rustc_target/src/spec/base/mod.rs +++ b/compiler/rustc_target/src/spec/base/mod.rs @@ -8,6 +8,7 @@ pub(crate) mod dragonfly; pub(crate) mod freebsd; pub(crate) mod fuchsia; pub(crate) mod haiku; +pub(crate) mod helenos; pub(crate) mod hermit; pub(crate) mod hurd; pub(crate) mod hurd_gnu; diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs index 6529c2d72c827..179bee5ef6d5b 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs @@ -1841,6 +1841,12 @@ supported_targets! { ("i686-unknown-haiku", i686_unknown_haiku), ("x86_64-unknown-haiku", x86_64_unknown_haiku), + ("aarch64-unknown-helenos", aarch64_unknown_helenos), + ("i686-unknown-helenos", i686_unknown_helenos), + ("powerpc-unknown-helenos", powerpc_unknown_helenos), + ("sparc64-unknown-helenos", sparc64_unknown_helenos), + ("x86_64-unknown-helenos", x86_64_unknown_helenos), + ("i686-unknown-hurd-gnu", i686_unknown_hurd_gnu), ("x86_64-unknown-hurd-gnu", x86_64_unknown_hurd_gnu), diff --git a/compiler/rustc_target/src/spec/targets/aarch64_unknown_helenos.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_helenos.rs new file mode 100644 index 0000000000000..31b4a2111cbf6 --- /dev/null +++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_helenos.rs @@ -0,0 +1,22 @@ +use crate::spec::{Target, base}; + +pub(crate) fn target() -> Target { + let mut base = base::helenos::opts(); + base.max_atomic_width = Some(128); + base.features = "+v8a".into(); + base.linker = Some("aarch64-helenos-gcc".into()); + + Target { + llvm_target: "aarch64-unknown-helenos".into(), + metadata: crate::spec::TargetMetadata { + description: Some("ARM64 HelenOS".into()), + tier: Some(3), + host_tools: Some(false), + std: Some(true), + }, + pointer_width: 64, + data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(), + arch: "aarch64".into(), + options: base, + } +} diff --git a/compiler/rustc_target/src/spec/targets/i686_unknown_helenos.rs b/compiler/rustc_target/src/spec/targets/i686_unknown_helenos.rs new file mode 100644 index 0000000000000..1cd32d6f78d93 --- /dev/null +++ b/compiler/rustc_target/src/spec/targets/i686_unknown_helenos.rs @@ -0,0 +1,26 @@ +use crate::spec::{Cc, LinkerFlavor, Lld, RustcAbi, Target, base}; + +pub(crate) fn target() -> Target { + let mut base = base::helenos::opts(); + base.cpu = "pentium4".into(); + base.max_atomic_width = Some(64); + base.linker = Some("i686-helenos-gcc".into()); + base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m32"]); + base.rustc_abi = Some(RustcAbi::X86Sse2); + + Target { + llvm_target: "i686-unknown-helenos".into(), + metadata: crate::spec::TargetMetadata { + description: Some("IA-32 (i686) HelenOS".into()), + tier: Some(3), + host_tools: Some(false), + std: Some(true), + }, + pointer_width: 32, + data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ + i128:128-f64:32:64-f80:32-n8:16:32-S128" + .into(), + arch: "x86".into(), + options: base, + } +} diff --git a/compiler/rustc_target/src/spec/targets/powerpc_unknown_helenos.rs b/compiler/rustc_target/src/spec/targets/powerpc_unknown_helenos.rs new file mode 100644 index 0000000000000..2b713e8a5ff2f --- /dev/null +++ b/compiler/rustc_target/src/spec/targets/powerpc_unknown_helenos.rs @@ -0,0 +1,24 @@ +use rustc_abi::Endian; + +use crate::spec::{Target, TargetMetadata, base}; + +pub(crate) fn target() -> Target { + let mut base = base::helenos::opts(); + base.endian = Endian::Big; + base.max_atomic_width = Some(32); + base.linker = Some("ppc-helenos-gcc".into()); + + Target { + llvm_target: "powerpc-unknown-helenos".into(), + metadata: TargetMetadata { + description: Some("PowerPC HelenOS".into()), + tier: Some(3), + host_tools: Some(false), + std: Some(true), + }, + pointer_width: 32, + data_layout: "E-m:e-p:32:32-Fn32-i64:64-n32".into(), + arch: "powerpc".into(), + options: base, + } +} diff --git a/compiler/rustc_target/src/spec/targets/sparc64_unknown_helenos.rs b/compiler/rustc_target/src/spec/targets/sparc64_unknown_helenos.rs new file mode 100644 index 0000000000000..8c3def57d0cf4 --- /dev/null +++ b/compiler/rustc_target/src/spec/targets/sparc64_unknown_helenos.rs @@ -0,0 +1,26 @@ +use rustc_abi::Endian; + +use crate::spec::{Cc, LinkerFlavor, Lld, Target, TargetMetadata, base}; + +pub(crate) fn target() -> Target { + let mut base = base::helenos::opts(); + base.endian = Endian::Big; + base.cpu = "v9".into(); + base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]); + base.max_atomic_width = Some(64); + base.linker = Some("sparc64-helenos-gcc".into()); + + Target { + llvm_target: "sparc64-unknown-helenos".into(), + metadata: TargetMetadata { + description: Some("SPARC HelenOS".into()), + tier: Some(3), + host_tools: Some(false), + std: Some(true), + }, + pointer_width: 64, + data_layout: "E-m:e-i64:64-i128:128-n32:64-S128".into(), + arch: "sparc64".into(), + options: base, + } +} diff --git a/compiler/rustc_target/src/spec/targets/x86_64_unknown_helenos.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_helenos.rs new file mode 100644 index 0000000000000..82c9807f73e3e --- /dev/null +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_helenos.rs @@ -0,0 +1,25 @@ +use crate::spec::{Cc, LinkerFlavor, Lld, Target, base}; + +pub(crate) fn target() -> Target { + let mut base = base::helenos::opts(); + base.cpu = "x86-64".into(); + base.plt_by_default = false; + base.max_atomic_width = Some(64); + base.linker = Some("amd64-helenos-gcc".into()); + base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]); + + Target { + llvm_target: "x86_64-unknown-helenos".into(), + metadata: crate::spec::TargetMetadata { + description: Some("64-bit HelenOS".into()), + tier: Some(3), + host_tools: Some(false), + std: Some(true), + }, + pointer_width: 64, + data_layout: + "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(), + arch: "x86_64".into(), + options: base, + } +} diff --git a/src/bootstrap/src/core/sanity.rs b/src/bootstrap/src/core/sanity.rs index af4ec679d080d..c4989c15d24ec 100644 --- a/src/bootstrap/src/core/sanity.rs +++ b/src/bootstrap/src/core/sanity.rs @@ -33,6 +33,11 @@ pub struct Finder { // // Targets can be removed from this list once they are present in the stage0 compiler (usually by updating the beta compiler of the bootstrap). const STAGE0_MISSING_TARGETS: &[&str] = &[ + "aarch64-unknown-helenos", + "i686-unknown-helenos", + "x86_64-unknown-helenos", + "powerpc-unknown-helenos", + "sparc64-unknown-helenos", // just a dummy comment so the list doesn't get onelined ]; diff --git a/src/doc/rustc/src/SUMMARY.md b/src/doc/rustc/src/SUMMARY.md index a3939e5a5c451..a1dfd81387919 100644 --- a/src/doc/rustc/src/SUMMARY.md +++ b/src/doc/rustc/src/SUMMARY.md @@ -107,6 +107,7 @@ - [solaris](platform-support/solaris.md) - [\*-nto-qnx-\*](platform-support/nto-qnx.md) - [\*-unikraft-linux-musl](platform-support/unikraft-linux-musl.md) + - [\*-unknown-helenos](platform-support/helenos.md) - [\*-unknown-hermit](platform-support/hermit.md) - [\*-unknown-freebsd](platform-support/freebsd.md) - [\*-unknown-netbsd\*](platform-support/netbsd.md) diff --git a/src/doc/rustc/src/platform-support.md b/src/doc/rustc/src/platform-support.md index e7dfaaf4fd5d8..b7d5f84cfc3c7 100644 --- a/src/doc/rustc/src/platform-support.md +++ b/src/doc/rustc/src/platform-support.md @@ -255,6 +255,7 @@ target | std | host | notes [`aarch64-kmc-solid_asp3`](platform-support/kmc-solid.md) | ✓ | | ARM64 SOLID with TOPPERS/ASP3 [`aarch64-nintendo-switch-freestanding`](platform-support/aarch64-nintendo-switch-freestanding.md) | * | | ARM64 Nintendo Switch, Horizon [`aarch64-unknown-freebsd`](platform-support/freebsd.md) | ✓ | ✓ | ARM64 FreeBSD +[`aarch64-unknown-helenos`](platform-support/helenos.md) | ✓ | | ARM64 HelenOS [`aarch64-unknown-hermit`](platform-support/hermit.md) | ✓ | | ARM64 Hermit [`aarch64-unknown-illumos`](platform-support/illumos.md) | ✓ | ✓ | ARM64 illumos `aarch64-unknown-linux-gnu_ilp32` | ✓ | ✓ | ARM64 Linux (ILP32 ABI) @@ -315,6 +316,7 @@ target | std | host | notes [`i686-apple-darwin`](platform-support/apple-darwin.md) | ✓ | ✓ | 32-bit macOS (10.12+, Sierra+, Penryn) [^x86_32-floats-return-ABI] [`i686-pc-nto-qnx700`](platform-support/nto-qnx.md) | * | | 32-bit x86 QNX Neutrino 7.0 RTOS (Pentium 4) [^x86_32-floats-return-ABI] `i686-unknown-haiku` | ✓ | ✓ | 32-bit Haiku (Pentium 4) [^x86_32-floats-return-ABI] +[`i686-unknown-helenos`](platform-support/helenos.md) | ✓ | | HelenOS IA-32 (see docs for pending issues) [`i686-unknown-hurd-gnu`](platform-support/hurd.md) | ✓ | ✓ | 32-bit GNU/Hurd (Pentium 4) [^x86_32-floats-return-ABI] [`i686-unknown-netbsd`](platform-support/netbsd.md) | ✓ | ✓ | NetBSD/i386 (Pentium 4) [^x86_32-floats-return-ABI] [`i686-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | 32-bit OpenBSD (Pentium 4) [^x86_32-floats-return-ABI] @@ -349,6 +351,7 @@ target | std | host | notes [`mipsisa64r6el-unknown-linux-gnuabi64`](platform-support/mips-release-6.md) | ✓ | ✓ | 64-bit MIPS Release 6 Little Endian `msp430-none-elf` | * | | 16-bit MSP430 microcontrollers [`powerpc-unknown-freebsd`](platform-support/freebsd.md) | ? | | PowerPC FreeBSD +[`powerpc-unknown-helenos`](platform-support/helenos.md) | ✓ | | PowerPC HelenOS [`powerpc-unknown-linux-gnuspe`](platform-support/powerpc-unknown-linux-gnuspe.md) | ✓ | | PowerPC SPE Linux `powerpc-unknown-linux-musl` | ? | | PowerPC Linux with musl 1.2.3 [`powerpc-unknown-linux-muslspe`](platform-support/powerpc-unknown-linux-muslspe.md) | ? | | PowerPC SPE Linux with musl 1.2.3 @@ -389,6 +392,7 @@ target | std | host | notes [`s390x-unknown-linux-musl`](platform-support/s390x-unknown-linux-musl.md) | ✓ | | S390x Linux (kernel 3.2, musl 1.2.3) `sparc-unknown-linux-gnu` | ✓ | | 32-bit SPARC Linux [`sparc-unknown-none-elf`](./platform-support/sparc-unknown-none-elf.md) | * | | Bare 32-bit SPARC V7+ +[`sparc64-unknown-helenos`](platform-support/helenos.md) | ✓ | | sparc64 HelenOS [`sparc64-unknown-netbsd`](platform-support/netbsd.md) | ✓ | ✓ | NetBSD/sparc64 [`sparc64-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | OpenBSD/sparc64 [`thumbv4t-none-eabi`](platform-support/armv4t-none-eabi.md) | * | | Thumb-mode Bare Armv4T @@ -418,6 +422,7 @@ target | std | host | notes `x86_64-unknown-dragonfly` | ✓ | ✓ | 64-bit DragonFlyBSD `x86_64-unknown-haiku` | ✓ | ✓ | 64-bit Haiku [`x86_64-unknown-hermit`](platform-support/hermit.md) | ✓ | | x86_64 Hermit +[`x86_64-unknown-helenos`](platform-support/helenos.md) | ✓ | | x86_64 (amd64) HelenOS [`x86_64-unknown-hurd-gnu`](platform-support/hurd.md) | ✓ | ✓ | 64-bit GNU/Hurd `x86_64-unknown-l4re-uclibc` | ? | | [`x86_64-unknown-linux-none`](platform-support/x86_64-unknown-linux-none.md) | * | | 64-bit Linux with no libc diff --git a/src/doc/rustc/src/platform-support/helenos.md b/src/doc/rustc/src/platform-support/helenos.md new file mode 100644 index 0000000000000..0dce4f6928ffb --- /dev/null +++ b/src/doc/rustc/src/platform-support/helenos.md @@ -0,0 +1,68 @@ +# `*-unknown-helenos` + +**Tier: 3** + +Targets for [HelenOS](https://www.helenos.org). +These targets allow compiling user-space applications, that you can then copy into your HelenOS ISO image to run them. + +Target triplets available: + +- `x86_64-unknown-helenos` +- `sparc64-unknown-helenos` +- `powerpc-unknown-helenos` +- `aarch64-unknown-helenos` +- `i686-unknown-helenos`* + + +On i686, some portions of native HelenOS libraries run into issues due to vector instructions accessing variables from the stack that seems +to be misaligned. It is not clear if this is fault of HelenOS or Rust. Most programs work, but for example calling `ui_window_create` from HelenOS +libui does not work. + +## Target maintainers + +- Matěj Volf ([@mvolfik](https://github.com/mvolfik)) + +## Requirements + +These targets only support cross-compilation. The targets will[^helenos-libstd-pending] support libstd, although support of some platform features (filesystem, networking) may be limited. + +You need to have a local clone of the HelenOS repository and the HelenOS toolchain set up, no HelenOS-Rust development artifacts are available. + +[^helenos-libstd-pending]: libstd is not yet available, because it needs to be done in a separate PR, because compiler support needs to be merged first to allow creating libc bindings + +## Building + +If you want to avoid the full setup, fully automated Docker-based build system is available at https://github.com/mvolfik/helenos-rust-autobuild + +### HelenOS toolchain setup + +For compilation of standard library, you need to build the HelenOS toolchain (because Rust needs to use `*-helenos-gcc` as linker) and its libraries (libc and a few others). See [this HelenOS wiki page](https://www.helenos.org/wiki/UsersGuide/CompilingFromSource#a2.Buildasupportedcross-compiler) for instruction on setting up the build. At the end of step 4 (_Configure and build_), after `ninja image_path`, invoke `ninja export-dev` to build the shared libraries. + +Copy the libraries to the path where the compiler automatically searches for them. This will be the directory where you installed the toolchain (for example `~/.local/share/HelenOS/cross/i686-helenos/lib`). In the folder where you built HelenOS, you can run these commands: + +```sh +touch /tmp/test.c +HELENOS_LIB_PATH="$(realpath "$(amd64-helenos-gcc -v -c /tmp/test.c 2>&1 | grep LIBRARY_PATH | cut -d= -f2 | cut -d: -f2)")" +# use sparc64-helenos-gcc above for the SPARC toolchain, etc +cp -P export-dev/lib/* "$HELENOS_LIB_PATH" +``` + +### Building the target + +When you have the HelenOS toolchain set up and installed in your path, you can build the Rust toolchain using the standard procedure. See [rustc dev guide](https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html). + +In the most simple case, this means that you can run `./x build library --stage 1 --target x86_64-unknown-linux-gnu,-unknown-helenos` (the first target triple should be your host machine, adjust accordingly). Then run `rustup toolchain link mytoolchain build/host/stage1` to allow using your toolchain for building Rust programs. + +### Building Rust programs + +If you linked the toolchain above as `mytoolchain`, run `cargo +mytoolchain build --target -unknown-helenos`. + +## Testing + +After you build a Rust program for HelenOS, you can put it into the `dist` directory of the HelenOS build, build the ISO image, and then run it either in an emulator, or on real hardware. See HelenOS wiki for further instructions on running the OS. + +Running the Rust testsuite has not been attempted yet due to missing host tools (thus the test suite can't be run natively) and insufficient networking support (thus we can't use the `remote-test-server` tool). + +## Cross-compilation toolchains and C code + +You should be able to cross-compile and link any needed C code using `-helenos-gcc` that you built above. However, note that clang support is highly lacking. Therefore, to run tools such as `bindgen`, you will need to provide flag `-nostdinc` and manually specify the include paths to HelenOS headers, which you will find in the `export-dev` folder + in the cross-compilation toolchain (e.g. `~/.local/share/HelenOS/cross/lib/gcc/i686-helenos/14.2.0/include`). You can see an example of proper build.rs at https://github.com/mvolfik/helenos-ui-rs/blob/master/build.rs diff --git a/tests/assembly/targets/targets-elf.rs b/tests/assembly/targets/targets-elf.rs index 3255591119498..f22ff81364738 100644 --- a/tests/assembly/targets/targets-elf.rs +++ b/tests/assembly/targets/targets-elf.rs @@ -25,6 +25,9 @@ //@ revisions: aarch64_unknown_fuchsia //@ [aarch64_unknown_fuchsia] compile-flags: --target aarch64-unknown-fuchsia //@ [aarch64_unknown_fuchsia] needs-llvm-components: aarch64 +//@ revisions: aarch64_unknown_helenos +//@ [aarch64_unknown_helenos] compile-flags: --target aarch64-unknown-helenos +//@ [aarch64_unknown_helenos] needs-llvm-components: aarch64 //@ revisions: aarch64_unknown_hermit //@ [aarch64_unknown_hermit] compile-flags: --target aarch64-unknown-hermit //@ [aarch64_unknown_hermit] needs-llvm-components: aarch64 @@ -241,6 +244,9 @@ //@ revisions: i686_unknown_haiku //@ [i686_unknown_haiku] compile-flags: --target i686-unknown-haiku //@ [i686_unknown_haiku] needs-llvm-components: x86 +//@ revisions: i686_unknown_helenos +//@ [i686_unknown_helenos] compile-flags: --target i686-unknown-helenos +//@ [i686_unknown_helenos] needs-llvm-components: x86 //@ revisions: i686_unknown_hurd_gnu //@ [i686_unknown_hurd_gnu] compile-flags: --target i686-unknown-hurd-gnu //@ [i686_unknown_hurd_gnu] needs-llvm-components: x86 @@ -373,6 +379,9 @@ //@ revisions: powerpc_unknown_freebsd //@ [powerpc_unknown_freebsd] compile-flags: --target powerpc-unknown-freebsd //@ [powerpc_unknown_freebsd] needs-llvm-components: powerpc +//@ revisions: powerpc_unknown_helenos +//@ [powerpc_unknown_helenos] compile-flags: --target powerpc-unknown-helenos +//@ [powerpc_unknown_helenos] needs-llvm-components: powerpc //@ revisions: powerpc_unknown_linux_gnu //@ [powerpc_unknown_linux_gnu] compile-flags: --target powerpc-unknown-linux-gnu //@ [powerpc_unknown_linux_gnu] needs-llvm-components: powerpc @@ -487,6 +496,9 @@ //@ revisions: s390x_unknown_linux_musl //@ [s390x_unknown_linux_musl] compile-flags: --target s390x-unknown-linux-musl //@ [s390x_unknown_linux_musl] needs-llvm-components: systemz +//@ revisions: sparc64_unknown_helenos +//@ [sparc64_unknown_helenos] compile-flags: --target sparc64-unknown-helenos +//@ [sparc64_unknown_helenos] needs-llvm-components: sparc //@ revisions: sparc64_unknown_linux_gnu //@ [sparc64_unknown_linux_gnu] compile-flags: --target sparc64-unknown-linux-gnu //@ [sparc64_unknown_linux_gnu] needs-llvm-components: sparc @@ -601,6 +613,9 @@ //@ revisions: x86_64_unknown_haiku //@ [x86_64_unknown_haiku] compile-flags: --target x86_64-unknown-haiku //@ [x86_64_unknown_haiku] needs-llvm-components: x86 +//@ revisions: x86_64_unknown_helenos +//@ [x86_64_unknown_helenos] compile-flags: --target x86_64-unknown-helenos +//@ [x86_64_unknown_helenos] needs-llvm-components: x86 //@ revisions: x86_64_unknown_hurd_gnu //@ [x86_64_unknown_hurd_gnu] compile-flags: --target x86_64-unknown-hurd-gnu //@ [x86_64_unknown_hurd_gnu] needs-llvm-components: x86 diff --git a/tests/ui/check-cfg/well-known-values.stderr b/tests/ui/check-cfg/well-known-values.stderr index 7cda6c2eaa529..2cdb126c39bc4 100644 --- a/tests/ui/check-cfg/well-known-values.stderr +++ b/tests/ui/check-cfg/well-known-values.stderr @@ -201,7 +201,7 @@ warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` LL | target_os = "_UNEXPECTED_VALUE", | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: expected values for `target_os` are: `aix`, `amdhsa`, `android`, `cuda`, `cygwin`, `dragonfly`, `emscripten`, `espidf`, `freebsd`, `fuchsia`, `haiku`, `hermit`, `horizon`, `hurd`, `illumos`, `ios`, `l4re`, `linux`, `lynxos178`, `macos`, `netbsd`, `none`, `nto`, `nuttx`, `openbsd`, `psp`, `psx`, `redox`, `rtems`, `solaris`, `solid_asp3`, `teeos`, `trusty`, `tvos`, `uefi`, `unknown`, `visionos`, `vita`, `vxworks`, `wasi`, `watchos`, `windows`, `xous`, and `zkvm` + = note: expected values for `target_os` are: `aix`, `amdhsa`, `android`, `cuda`, `cygwin`, `dragonfly`, `emscripten`, `espidf`, `freebsd`, `fuchsia`, `haiku`, `helenos`, `hermit`, `horizon`, `hurd`, `illumos`, `ios`, `l4re`, `linux`, `lynxos178`, `macos`, `netbsd`, `none`, `nto`, `nuttx`, `openbsd`, `psp`, `psx`, `redox`, `rtems`, `solaris`, `solid_asp3`, `teeos`, `trusty`, `tvos`, `uefi`, `unknown`, `visionos`, `vita`, `vxworks`, `wasi`, `watchos`, `windows`, `xous`, and `zkvm` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` @@ -274,7 +274,7 @@ LL | #[cfg(target_os = "linuz")] // testing that we suggest `linux` | | | help: there is a expected value with a similar name: `"linux"` | - = note: expected values for `target_os` are: `aix`, `amdhsa`, `android`, `cuda`, `cygwin`, `dragonfly`, `emscripten`, `espidf`, `freebsd`, `fuchsia`, `haiku`, `hermit`, `horizon`, `hurd`, `illumos`, `ios`, `l4re`, `linux`, `lynxos178`, `macos`, `netbsd`, `none`, `nto`, `nuttx`, `openbsd`, `psp`, `psx`, `redox`, `rtems`, `solaris`, `solid_asp3`, `teeos`, `trusty`, `tvos`, `uefi`, `unknown`, `visionos`, `vita`, `vxworks`, `wasi`, `watchos`, `windows`, `xous`, and `zkvm` + = note: expected values for `target_os` are: `aix`, `amdhsa`, `android`, `cuda`, `cygwin`, `dragonfly`, `emscripten`, `espidf`, `freebsd`, `fuchsia`, `haiku`, `helenos`, `hermit`, `horizon`, `hurd`, `illumos`, `ios`, `l4re`, `linux`, `lynxos178`, `macos`, `netbsd`, `none`, `nto`, `nuttx`, `openbsd`, `psp`, `psx`, `redox`, `rtems`, `solaris`, `solid_asp3`, `teeos`, `trusty`, `tvos`, `uefi`, `unknown`, `visionos`, `vita`, `vxworks`, `wasi`, `watchos`, `windows`, `xous`, and `zkvm` = note: see for more information about checking conditional configuration warning: 28 warnings emitted