@@ -766,14 +766,15 @@ fn main_result() -> anyhow::Result<i32> {
766766 runtime : & runtime_benchmark_dir,
767767 } ;
768768
769- // XXX: This doesn't necessarily work for all archs
770- let target_triple = format ! ( "{}-unknown-linux-gnu" , std:: env:: consts:: ARCH ) ;
769+ // This clearly won't work for all architectures, but should be good enough for x64 Linux
770+ // and ARM 64-bit Linux.
771+ let host_target_tuple = format ! ( "{}-unknown-linux-gnu" , std:: env:: consts:: ARCH ) ;
771772
772773 match args. command {
773774 Commands :: BinaryStats { mode, symbols } => {
774775 match mode {
775776 BinaryStatsMode :: Compile ( args) => {
776- binary_stats_compile ( args, symbols, & target_triple ) ?;
777+ binary_stats_compile ( args, symbols, & host_target_tuple ) ?;
777778 }
778779 BinaryStatsMode :: Local ( args) => {
779780 binary_stats_local ( args, symbols) ?;
@@ -792,7 +793,7 @@ fn main_result() -> anyhow::Result<i32> {
792793 purge,
793794 } => {
794795 log_db ( & db) ;
795- let toolchain = get_local_toolchain_for_runtime_benchmarks ( & local, & target_triple ) ?;
796+ let toolchain = get_local_toolchain_for_runtime_benchmarks ( & local, & host_target_tuple ) ?;
796797 let pool = Pool :: open ( & db. db ) ;
797798
798799 let isolation_mode = if no_isolate {
@@ -846,7 +847,7 @@ fn main_result() -> anyhow::Result<i32> {
846847 rustc,
847848 ToolchainConfig :: default ( ) ,
848849 id,
849- target_triple . clone ( ) ,
850+ host_target_tuple . clone ( ) ,
850851 ) ?;
851852 let suite = prepare_runtime_benchmark_suite (
852853 & toolchain,
@@ -903,7 +904,7 @@ fn main_result() -> anyhow::Result<i32> {
903904 rustc,
904905 ToolchainConfig :: default ( ) ,
905906 id,
906- target_triple . clone ( ) ,
907+ host_target_tuple . clone ( ) ,
907908 ) ?;
908909 Ok :: < _ , anyhow:: Error > ( toolchain)
909910 } ;
@@ -946,7 +947,7 @@ fn main_result() -> anyhow::Result<i32> {
946947 . cargo ( local. cargo . as_deref ( ) , local. cargo_config . as_slice ( ) )
947948 . id ( local. id . as_deref ( ) ) ,
948949 "" ,
949- target_triple ,
950+ host_target_tuple ,
950951 ) ?;
951952
952953 let mut benchmarks = get_compile_benchmarks ( & compile_benchmark_dir, ( & local) . into ( ) ) ?;
@@ -1015,7 +1016,7 @@ fn main_result() -> anyhow::Result<i32> {
10151016 match next {
10161017 NextArtifact :: Release ( tag) => {
10171018 let toolchain =
1018- create_toolchain_from_published_version ( & tag, & target_triple ) ?;
1019+ create_toolchain_from_published_version ( & tag, & host_target_tuple ) ?;
10191020 let conn = rt. block_on ( pool. connection ( ) ) ;
10201021 rt. block_on ( bench_published_artifact ( conn, toolchain, & benchmark_dirs) )
10211022 }
@@ -1056,7 +1057,7 @@ fn main_result() -> anyhow::Result<i32> {
10561057 } ;
10571058 let sha = commit. sha . to_string ( ) ;
10581059 let sysroot = rt
1059- . block_on ( Sysroot :: install ( sha. clone ( ) , & target_triple , & backends) )
1060+ . block_on ( Sysroot :: install ( sha. clone ( ) , & host_target_tuple , & backends) )
10601061 . with_context ( || {
10611062 format ! ( "failed to install sysroot for {:?}" , commit)
10621063 } ) ?;
@@ -1135,7 +1136,8 @@ fn main_result() -> anyhow::Result<i32> {
11351136 let pool = database:: Pool :: open ( & db. db ) ;
11361137 let rt = build_async_runtime ( ) ;
11371138 let conn = rt. block_on ( pool. connection ( ) ) ;
1138- let toolchain = create_toolchain_from_published_version ( & toolchain, & target_triple) ?;
1139+ let toolchain =
1140+ create_toolchain_from_published_version ( & toolchain, & host_target_tuple) ?;
11391141 rt. block_on ( bench_published_artifact ( conn, toolchain, & benchmark_dirs) ) ?;
11401142 Ok ( 0 )
11411143 }
@@ -1183,7 +1185,7 @@ fn main_result() -> anyhow::Result<i32> {
11831185 . cargo ( local. cargo . as_deref ( ) , local. cargo_config . as_slice ( ) )
11841186 . id ( local. id . as_deref ( ) ) ,
11851187 suffix,
1186- target_triple . clone ( ) ,
1188+ host_target_tuple . clone ( ) ,
11871189 ) ?;
11881190 let id = toolchain. id . clone ( ) ;
11891191 profile_compile (
@@ -1250,7 +1252,7 @@ fn main_result() -> anyhow::Result<i32> {
12501252 let rt = build_async_runtime ( ) ;
12511253 let mut sysroot = rt. block_on ( Sysroot :: install (
12521254 commit. sha ,
1253- & target_triple ,
1255+ & host_target_tuple ,
12541256 & codegen_backends. 0 ,
12551257 ) ) ?;
12561258 sysroot. preserve ( ) ; // don't delete it
0 commit comments