@@ -1045,6 +1045,45 @@ pub mod consts {
10451045 #[ stable( feature = "env" , since = "1.0.0" ) ]
10461046 pub const ARCH : & str = env ! ( "STD_ENV_ARCH" ) ;
10471047
1048+ /// An identifier used to select the platform for which the standard library was built
1049+ #[ doc = concat ! ( "(`\" " , env!( "STD_ENV_HOST_TUPLE" ) , "\" `)." ) ]
1050+ ///
1051+ /// This is also known as a *target triple* or *target platform*.
1052+ ///
1053+ /// The exact format of this string may vary. For details about the platform,
1054+ /// use the [`ARCH`], [`FAMILY`], and [`OS`] constants.
1055+ ///
1056+ /// For platform-specific code, use the [`#[cfg]` attribute][cfg] or [`cfg!` macro](crate::cfg!)
1057+ /// with the predefined [`target_*` options][target_cfg].
1058+ ///
1059+ /// [cfg]: ../../../reference/conditional-compilation.html#the-cfg-attribute
1060+ /// [target_cfg]: ../../../reference/conditional-compilation.html#r-cfg.options.set
1061+ ///
1062+ /// <details><summary>Example values</summary>
1063+ ///
1064+ /// * `"aarch64-apple-ios-sim"`
1065+ /// * `"aarch64-unknown-linux-gnu"`
1066+ /// * `"aarch64-unknown-linux-gnu_ilp32"`
1067+ /// * `"avr-none"`
1068+ /// * `"loongarch64-unknown-none-softfloat"`
1069+ /// * `"mipsel-sony-psx"`
1070+ /// * `"nvptx64-nvidia-cuda"`
1071+ /// * `"powerpc64le-unknown-freebsd"`
1072+ /// * `"riscv64-linux-android"`
1073+ /// * `"sparcv9-sun-solaris"`
1074+ /// * `"thumbv7a-uwp-windows-msvc"`
1075+ /// * `"thumbv7neon-unknown-linux-musleabihf"`
1076+ /// * `"thumbv8m.main-none-eabihf"`
1077+ /// * `"wasm32-wasip1"`
1078+ /// * `"x86_64-pc-windows-msvc"`
1079+ /// * `"x86_64-unknown-redox"`
1080+ /// * `"xtensa-esp32s3-none-elf"`
1081+ ///
1082+ /// </details>
1083+ #[ unstable( feature = "env_host_tuple" , issue = "146295" ) ]
1084+ #[ doc( alias = "TARGET" ) ]
1085+ pub const HOST_TUPLE : & str = env ! ( "STD_ENV_HOST_TUPLE" ) ;
1086+
10481087 /// A string describing the family of the operating system.
10491088 /// An example value may be: `"unix"`, or `"windows"`.
10501089 ///
0 commit comments