@@ -766,14 +766,15 @@ fn main_result() -> anyhow::Result<i32> {
766
766
runtime : & runtime_benchmark_dir,
767
767
} ;
768
768
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 ) ;
771
772
772
773
match args. command {
773
774
Commands :: BinaryStats { mode, symbols } => {
774
775
match mode {
775
776
BinaryStatsMode :: Compile ( args) => {
776
- binary_stats_compile ( args, symbols, & target_triple ) ?;
777
+ binary_stats_compile ( args, symbols, & host_target_tuple ) ?;
777
778
}
778
779
BinaryStatsMode :: Local ( args) => {
779
780
binary_stats_local ( args, symbols) ?;
@@ -792,7 +793,7 @@ fn main_result() -> anyhow::Result<i32> {
792
793
purge,
793
794
} => {
794
795
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 ) ?;
796
797
let pool = Pool :: open ( & db. db ) ;
797
798
798
799
let isolation_mode = if no_isolate {
@@ -846,7 +847,7 @@ fn main_result() -> anyhow::Result<i32> {
846
847
rustc,
847
848
ToolchainConfig :: default ( ) ,
848
849
id,
849
- target_triple . clone ( ) ,
850
+ host_target_tuple . clone ( ) ,
850
851
) ?;
851
852
let suite = prepare_runtime_benchmark_suite (
852
853
& toolchain,
@@ -903,7 +904,7 @@ fn main_result() -> anyhow::Result<i32> {
903
904
rustc,
904
905
ToolchainConfig :: default ( ) ,
905
906
id,
906
- target_triple . clone ( ) ,
907
+ host_target_tuple . clone ( ) ,
907
908
) ?;
908
909
Ok :: < _ , anyhow:: Error > ( toolchain)
909
910
} ;
@@ -946,7 +947,7 @@ fn main_result() -> anyhow::Result<i32> {
946
947
. cargo ( local. cargo . as_deref ( ) , local. cargo_config . as_slice ( ) )
947
948
. id ( local. id . as_deref ( ) ) ,
948
949
"" ,
949
- target_triple ,
950
+ host_target_tuple ,
950
951
) ?;
951
952
952
953
let mut benchmarks = get_compile_benchmarks ( & compile_benchmark_dir, ( & local) . into ( ) ) ?;
@@ -1015,7 +1016,7 @@ fn main_result() -> anyhow::Result<i32> {
1015
1016
match next {
1016
1017
NextArtifact :: Release ( tag) => {
1017
1018
let toolchain =
1018
- create_toolchain_from_published_version ( & tag, & target_triple ) ?;
1019
+ create_toolchain_from_published_version ( & tag, & host_target_tuple ) ?;
1019
1020
let conn = rt. block_on ( pool. connection ( ) ) ;
1020
1021
rt. block_on ( bench_published_artifact ( conn, toolchain, & benchmark_dirs) )
1021
1022
}
@@ -1056,7 +1057,7 @@ fn main_result() -> anyhow::Result<i32> {
1056
1057
} ;
1057
1058
let sha = commit. sha . to_string ( ) ;
1058
1059
let sysroot = rt
1059
- . block_on ( Sysroot :: install ( sha. clone ( ) , & target_triple , & backends) )
1060
+ . block_on ( Sysroot :: install ( sha. clone ( ) , & host_target_tuple , & backends) )
1060
1061
. with_context ( || {
1061
1062
format ! ( "failed to install sysroot for {:?}" , commit)
1062
1063
} ) ?;
@@ -1135,7 +1136,8 @@ fn main_result() -> anyhow::Result<i32> {
1135
1136
let pool = database:: Pool :: open ( & db. db ) ;
1136
1137
let rt = build_async_runtime ( ) ;
1137
1138
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) ?;
1139
1141
rt. block_on ( bench_published_artifact ( conn, toolchain, & benchmark_dirs) ) ?;
1140
1142
Ok ( 0 )
1141
1143
}
@@ -1183,7 +1185,7 @@ fn main_result() -> anyhow::Result<i32> {
1183
1185
. cargo ( local. cargo . as_deref ( ) , local. cargo_config . as_slice ( ) )
1184
1186
. id ( local. id . as_deref ( ) ) ,
1185
1187
suffix,
1186
- target_triple . clone ( ) ,
1188
+ host_target_tuple . clone ( ) ,
1187
1189
) ?;
1188
1190
let id = toolchain. id . clone ( ) ;
1189
1191
profile_compile (
@@ -1250,7 +1252,7 @@ fn main_result() -> anyhow::Result<i32> {
1250
1252
let rt = build_async_runtime ( ) ;
1251
1253
let mut sysroot = rt. block_on ( Sysroot :: install (
1252
1254
commit. sha ,
1253
- & target_triple ,
1255
+ & host_target_tuple ,
1254
1256
& codegen_backends. 0 ,
1255
1257
) ) ?;
1256
1258
sysroot. preserve ( ) ; // don't delete it
0 commit comments