rust/compiler/rustc_target/src/spec/base
Chris Denton 709f4fee50
Rollup merge of #139868 - thaliaarchi:move-env-consts-pal, r=joboet
Move `pal::env` to `std::sys::env_consts`

Combine the `std::env::consts` platform implementations as a single file. Use the Unix file as the base, since it has 28 entries, and fold the 8 singleton platforms into it. The Unix file was roughly grouped into Linux, Apple, BSD, and everything else, roughly in alphabetical order. Alphabetically order them to make it easier to maintain and discard the Unix-specific groups to generalize it to all platforms.

I'd prefer to have no fallback implementation, as I consider it a bug; however TEEOS, Trusty, and Xous have no definitions here. Since they otherwise have `pal` abstractions, that indicates that there are several platforms without `pal` abstractions which are also missing here. To support unsupported, create a little macro to handle the fallback case and not introduce ordering between the `cfg`s like `cfg_if!`.

I've named the module `std::sys::env_consts`, because they are used in `std::env::consts` and I intend to use the name `std::sys::env` for the combination of `Args` and `Vars`.

cc `@joboet` `@ChrisDenton`

Tracked in #117276.
2025-04-19 15:09:35 +00:00
..
apple refactor: Move env parsing of deployment target to rustc_session 2025-04-04 15:02:22 +02:00
aix.rs Adds binary_format to rustc target specs 2025-02-17 20:32:12 +05:30
android.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
avr.rs Create a generic AVR target: avr-none 2025-02-19 19:01:51 +01:00
bpf.rs compiler: make rustc_target have less weird reexports 2025-02-06 01:39:46 -08:00
cygwin.rs Adds binary_format to rustc target specs 2025-02-17 20:32:12 +05:30
dragonfly.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
freebsd.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
fuchsia.rs Sync Fuchsia target spec with clang Fuchsia driver 2025-02-20 18:44:21 +00:00
haiku.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
hermit.rs Add warn(unreachable_pub) to rustc_target. 2024-09-03 08:49:54 +10:00
hurd.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
hurd_gnu.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
illumos.rs Rustfmt 2025-02-08 22:12:13 +00:00
l4re.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
linux.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
linux_gnu.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
linux_musl.rs Use struct update syntax for some TargetOptions 2025-04-18 19:49:23 -07:00
linux_ohos.rs Use struct update syntax for some TargetOptions 2025-04-18 19:49:23 -07:00
linux_uclibc.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
linux_wasm.rs Target definition for wasm32-wali-linux-musl to support the Wasm Linux 2025-03-10 21:26:45 -04:00
lynxos178.rs Add minimal x86_64-lynx-lynxos178 support. 2025-04-10 13:37:49 +02:00
mod.rs Add minimal x86_64-lynx-lynxos178 support. 2025-04-10 13:37:49 +02:00
msvc.rs Adds binary_format to rustc target specs 2025-02-17 20:32:12 +05:30
netbsd.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
nto_qnx.rs Rustfmt 2025-02-08 22:12:13 +00:00
openbsd.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
redox.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
solaris.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
solid.rs Add warn(unreachable_pub) to rustc_target. 2024-09-03 08:49:54 +10:00
teeos.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
thumb.rs Add warn(unreachable_pub) to rustc_target. 2024-09-03 08:49:54 +10:00
uefi_msvc.rs Rustfmt 2025-02-08 22:12:13 +00:00
unikraft_linux_musl.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
vxworks.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
wasm.rs Adds binary_format to rustc target specs 2025-02-17 20:32:12 +05:30
windows_gnu.rs Adds binary_format to rustc target specs 2025-02-17 20:32:12 +05:30
windows_gnullvm.rs Adds binary_format to rustc target specs 2025-02-17 20:32:12 +05:30
windows_msvc.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
windows_uwp_gnu.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
windows_uwp_msvc.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
xtensa.rs compiler: make rustc_target have less weird reexports 2025-02-06 01:39:46 -08:00