@@ -268,16 +268,16 @@ pub type LinkArgs = BTreeMap<LinkerFlavor, Vec<String>>;
268268pub type TargetResult = Result < Target , String > ;
269269
270270macro_rules! supported_targets {
271- ( $( ( $triple: expr , $module: ident) , ) + ) => (
272- $( mod $module; ) *
271+ ( $( ( $( $ triple: literal , ) + $module: ident ) , ) + ) => {
272+ $( mod $module; ) +
273273
274274 /// List of supported targets
275- const TARGETS : & [ & str ] = & [ $( $triple) ,* ] ;
275+ const TARGETS : & [ & str ] = & [ $( $( $ triple) ,+ ) ,+ ] ;
276276
277277 fn load_specific( target: & str ) -> Result <Target , LoadTargetError > {
278278 match target {
279279 $(
280- $triple => {
280+ $( $ triple) |+ => {
281281 let mut t = $module:: target( )
282282 . map_err( LoadTargetError :: Other ) ?;
283283 t. options. is_builtin = true ;
@@ -307,7 +307,7 @@ macro_rules! supported_targets {
307307 mod test_json_encode_decode {
308308 use serialize:: json:: ToJson ;
309309 use super :: Target ;
310- $( use super :: $module; ) *
310+ $( use super :: $module; ) +
311311
312312 $(
313313 #[ test]
@@ -322,9 +322,9 @@ macro_rules! supported_targets {
322322 assert_eq!( original, parsed) ;
323323 } ) ;
324324 }
325- ) *
325+ ) +
326326 }
327- )
327+ } ;
328328}
329329
330330supported_targets ! {
@@ -426,7 +426,9 @@ supported_targets! {
426426 ( "armv7r-none-eabi" , armv7r_none_eabi) ,
427427 ( "armv7r-none-eabihf" , armv7r_none_eabihf) ,
428428
429- ( "x86_64-sun-solaris" , x86_64_sun_solaris) ,
429+ // `x86_64-pc-solaris` is an alias for `x86_64_sun_solaris` for backwards compatibility reasons.
430+ // (See <https://github.com/rust-lang/rust/issues/40531>.)
431+ ( "x86_64-sun-solaris" , "x86_64-pc-solaris" , x86_64_sun_solaris) ,
430432 ( "sparcv9-sun-solaris" , sparcv9_sun_solaris) ,
431433
432434 ( "x86_64-pc-windows-gnu" , x86_64_pc_windows_gnu) ,
0 commit comments