@@ -97,6 +97,13 @@ static LIST_ENVS: &[&str] = &[
9797    "musl" , 
9898] ; 
9999
100+ // Linux hosts don't indicate clib in uname, however binaries only 
101+ // run on boxes with the same clib, as expected. 
102+ #[ cfg( all( not( windows) ,  not( target_env = "musl" ) ) ) ]  
103+ const  TRIPLE_X86_64_UNKNOWN_LINUX :  & str  = "x86_64-unknown-linux-gnu" ; 
104+ #[ cfg( all( not( windows) ,  target_env = "musl" ) ) ]  
105+ const  TRIPLE_X86_64_UNKNOWN_LINUX :  & str  = "x86_64-unknown-linux-musl" ; 
106+ 
100107// MIPS platforms don't indicate endianness in uname, however binaries only 
101108// run on boxes with the same endianness, as expected. 
102109// Hence we could distinguish between the variants with compile-time cfg() 
@@ -176,7 +183,7 @@ impl TargetTriple {
176183                ( _,  b"aarch64" )  if  cfg ! ( target_os = "android" )  => Some ( "aarch64-linux-android" ) , 
177184                ( _,  b"i686" )  if  cfg ! ( target_os = "android" )  => Some ( "i686-linux-android" ) , 
178185                ( _,  b"x86_64" )  if  cfg ! ( target_os = "android" )  => Some ( "x86_64-linux-android" ) , 
179-                 ( b"Linux" ,  b"x86_64" )  => Some ( "x86_64-unknown-linux-gnu" ) , 
186+                 ( b"Linux" ,  b"x86_64" )  => Some ( TRIPLE_X86_64_UNKNOWN_LINUX ) , 
180187                ( b"Linux" ,  b"i686" )  => Some ( "i686-unknown-linux-gnu" ) , 
181188                ( b"Linux" ,  b"mips" )  => Some ( TRIPLE_MIPS_UNKNOWN_LINUX_GNU ) , 
182189                ( b"Linux" ,  b"mips64" )  => Some ( TRIPLE_MIPS64_UNKNOWN_LINUX_GNUABI64 ) , 
0 commit comments