Change:
There are actually two different generally expected encodings of the host tuple and they're subtly different than what some might expect. For example, 'x8664-sun-solaris' should probably be x8664-pc-solaris. The reason for that is that the encoding schemes are actually: So while 'sparcv9-sun-solaris' is correct because Sun is the (historical) manufacturer of sparc CPUs, 'x8664-sun-solaris' is not, because the MANUFACTURER here is the manufacturer of the CPU not the operating system. There are special cases for this, for example 'x8664-apple-darwin', even though Apple doesn't make x8664 CPUs, but following gcc/clang conventions leads us to x8664-pc-solaris. <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --This issue has been assigned to via . <!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
/cc /cc
An interesting discrepancy here is that our target and the LLVM target currently don't match. I'm not sure whether we can/should change anything here for backwards compatibility reasons, though an alias seems fine.
Hi, can I take this issue up? Can someone give a hint on how to fix this? I am a rust beginner, interested in compilers. This would be my first contribution.
as far as I can tell, you should just be able to add a new line under: containing , and then add a new line under: containing: (Sorry for the delay: I only just saw your message.)
claim
I wonder how it's supposed to work? Only x86_64-sun-solaris continues work for me: This change make it harder for Mozilla Firefox to decide which target to use...
I think we may have to introduce some changes in to make rustc try to use the alias. I.e. should try to use the target . I haven't had time to look into what else needs to be changed.
Closing as a duplicate of

Discussion:
pub type TargetResult = Result<Target, String>; macro_rules! supported_targets { <del> ( $(($triple:expr, $module:ident),)+ ) => ( $(mod $module;)* </del> <ins> ( $(($( $triple:literal, )+ $module:ident ),)+ ) => { $(mod $module;)+ </ins> /// List of supported targets <del> const TARGETS: &[&str] = &[$($triple),*]; </del> <ins> const TARGETS: &[&str] = &[$($($triple),+),+]; </ins> fn load_specific(target: &str) -> Result<Target, LoadTargetError> { match target { $( <del> $triple => { </del> <ins> $($triple)|+ => { </ins> let mut t = $module::target() .map_err(LoadTargetError::Other)?; t.options.is_builtin = true;

mod test_json_encode_decode { use serialize::json::ToJson; use super::Target; <del> $(use super::$module;)* </del> <ins> $(use super::$module;)+ </ins> $( #[test]

assert_eq!(original, parsed); }); } <del> )* </del> <ins> )+ </ins> } <del> ) </del> <ins> }; </ins> } supported_targets! {

("armv7r-none-eabi", armv7r_none_eabi), ("armv7r-none-eabihf", armv7r_none_eabihf), <del> ("x86_64-sun-solaris", x86_64_sun_solaris), </del> <ins> // `x86_64-pc-solaris` is an alias for `x86_64_sun_solaris` for backwards compatibility reasons. // (See <https://github.com/rust-lang/rust/issues/40531>.) ("x86_64-sun-solaris", "x86_64-pc-solaris", x86_64_sun_solaris), </ins> ("sparcv9-sun-solaris", sparcv9_sun_solaris), ("x86_64-pc-windows-gnu", x86_64_pc_windows_gnu),

"x86_64-pc-windows-msvc", "x86_64-rumprun-netbsd", "x86_64-sun-solaris", <ins> "x86_64-pc-solaris", </ins> "x86_64-unknown-cloudabi", "x86_64-unknown-freebsd", "x86_64-unknown-linux-gnu",